backupccl: replace memory accumulator with bound account#74479
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Jan 7, 2022
Merged
backupccl: replace memory accumulator with bound account#74479craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
dt
approved these changes
Jan 6, 2022
| // accumulator. | ||
| s.backupMem.release(smallFileBuffer.Get(s.conf.settings)) | ||
| // Release the memory reserved for the file buffer. | ||
| s.memAcc.Shrink(s.ctx, smallFileBuffer.Get(s.conf.settings)) |
Contributor
There was a problem hiding this comment.
I know this is in the existing code, but this should really read the the setting once before it goes to Grow and then store how much it asked for and then release that -- Shrinking the current value of the setting does not really ensure we shrinked by as much as we grew.
Contributor
Author
There was a problem hiding this comment.
good point, done.
8dc7081 to
09ab665
Compare
This change replaces the memory accumulator with a raw bound account. The memory accumulator provides a threadsafe wrapper around the bound account, and some redundant resource pooling semantics. Both of these are currently not needed by the sstSink that is being memory monitored. This change deletes the memory accumulator. Release note: None
09ab665 to
21118a0
Compare
Contributor
Author
|
TFTR! bors r=dt |
Contributor
|
Build succeeded: |
This file contains hidden or 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
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.
This change replaces the memory accumulator with a raw bound
account. The memory accumulator provides a threadsafe wrapper
around the bound account, and some redundant resource pooling
semantics. Both of these are currently not needed by the sstSink
that is being memory monitored. This change deletes the memory
accumulator.
Release note: None