Skip to content

Raft cache persist improve - #5

Merged
flowbehappy merged 6 commits into
raftfrom
raft-cache-persit-improve
Mar 1, 2019
Merged

Raft cache persist improve#5
flowbehappy merged 6 commits into
raftfrom
raft-cache-persit-improve

Conversation

@flowbehappy

@flowbehappy flowbehappy commented Feb 26, 2019

Copy link
Copy Markdown
Contributor

Comment thread dbms/src/Common/ErrorCodes.cpp Outdated

template <bool is_set, typename T, template <typename E = T, typename...> class Container, class Write, class Read>
struct PersistedContainerSetOrVector
template <bool is_map, bool is_set, class Trait>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can make abstraction in the concept of Iterator later if have time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is map use K and V, while others use T only. I can unify map by std::pair<K, V>, but not user friendly.

@ilovesoup ilovesoup changed the title Raft cache persit improve Raft cache persist improve Feb 27, 2019
@flowbehappy
flowbehappy merged commit d9c4906 into raft Mar 1, 2019
@solotzg
solotzg deleted the raft-cache-persit-improve branch July 10, 2019 05:31
windtalker added a commit to windtalker/tiflash that referenced this pull request Mar 6, 2023
Signed-off-by: xufei <xufei@pingcap.com>
JinheLin pushed a commit to JinheLin/tiflash-1 that referenced this pull request Apr 2, 2024
premal added a commit to 6si/tiflash that referenced this pull request Jun 25, 2026
…esponseWriter

Bug pingcap#5: DMFileReader::readWithFilter calls insertSelectiveFrom/insertRangeFrom
on ColumnDictionary columns; ColumnString::insertSelectiveRangeFrom does an
unchecked static_cast<ColumnString> which returns garbage sizes and causes
128 TiB allocation.

Bug pingcap#6: StreamingDAGResponseWriter (root MPP task writer) did not call
materializeBlocks() before encoding, leaving ColumnDictionary columns for
memory accounting (block.allocatedBytes()) which could interact with memory
tracking code paths and cause 8 EiB allocation.

Both fixes add convertToFullColumnIfDictionary() in the affected paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants