-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] (mem tracker) Refactor memtable mem tracker, fix flush memtable DCHECK failed #10156
Merged
morningman
merged 5 commits into
apache:master
from
xinyiZzz:fix_memtracker_0614_memtable
Jun 19, 2022
Merged
[fix] (mem tracker) Refactor memtable mem tracker, fix flush memtable DCHECK failed #10156
morningman
merged 5 commits into
apache:master
from
xinyiZzz:fix_memtracker_0614_memtable
Jun 19, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataroaring
previously approved these changes
Jun 15, 2022
PR approved by at least one committer and no changes requested. |
github-actions
bot
added
the
approved
Indicates a PR has been approved by one committer.
label
Jun 15, 2022
PR approved by anyone and no changes requested. |
github-actions
bot
removed
the
approved
Indicates a PR has been approved by one committer.
label
Jun 15, 2022
@dataroaring fix be ut, PTAL~ |
morningman
approved these changes
Jun 19, 2022
github-actions
bot
added
the
approved
Indicates a PR has been approved by one committer.
label
Jun 19, 2022
PR approved by at least one committer and no changes requested. |
freesinger
pushed a commit
to freesinger/incubator-doris
that referenced
this pull request
Jun 21, 2022
… DCHECK failed (apache#10156) 1. Added memory leak detection for `DeltaWriter` and `MemTable` mem tracker 2. Modify memtable mem tracker to virtual to avoid frequent recursive consumption of parent tracker. 3. Disable memtable flush thread attach memtable tracker, ensure that memtable mem tracker is completely accurate. 4. Modify `memory_verbose_track=false`. At present, there is a performance problem in the frequent switch thread mem tracker. - Because the mem tracker exists as a shared_ptr in the thread local. Each time it is switched, the atomic variable use_count in the shared_ptr of the current tracker will be -1, and the tracker to be replaced use_count +1, multi-threading Frequent changes to the same tracker shared_ptr are slow. - TODO: 1. Reduce unnecessary thread mem tracker switch, 2. Consider using raw pointers for mem tracker in thread local.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Issue Number: close #10154
Problem Summary:
Added memory leak detection for
DeltaWriter
andMemTable
mem trackerModify memtable mem tracker to virtual to avoid frequent recursive consumption of parent tracker.
Disable memtable flush thread attach memtable tracker, ensure that memtable mem tracker is completely accurate.
Modify
memory_verbose_track=false
. At present, there is a performance problem in the frequent switch thread mem tracker.Because the mem tracker exists as a shared_ptr in the thread local. Each time it is switched, the atomic variable use_count in the shared_ptr of the current tracker will be -1, and the tracker to be replaced use_count +1, multi-threading Frequent changes to the same tracker shared_ptr are slow.Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...