Skip to content
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

util: wrong memory count when use Tracker.ReplaceChild() #14513

Merged
merged 3 commits into from
Jan 19, 2020

Conversation

wshwsh12
Copy link
Contributor

@wshwsh12 wshwsh12 commented Jan 17, 2020

What problem does this PR solve?

When we use Tracker.ReplaceChild() to replace/remove child, is only updates the result for the parent, but not updates the nodes in the path of the tracker tree recursively.

What is changed and how it works?

Use t.Consume(bytes) to update the result.

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch 3.0

Release note

Fix a potential memory count problem.

@wshwsh12 wshwsh12 added type/bugfix This PR fixes a bug. component/util labels Jan 17, 2020
@wshwsh12 wshwsh12 requested review from SunRunAway and qw4990 January 17, 2020 08:04
@bb7133
Copy link
Member

bb7133 commented Jan 19, 2020

hi @wshwsh12 , please update the release note. Thanks!

Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@SunRunAway SunRunAway added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 19, 2020
Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@qw4990 qw4990 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 19, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jan 19, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jan 19, 2020

cherry pick to release-3.0 in PR #14533

@wshwsh12 wshwsh12 deleted the memtracker_remove branch April 21, 2020 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/util status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants