-
Notifications
You must be signed in to change notification settings - Fork 143
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: 17331: Improve in-memory virtual map mode to run garbage collection for merged copies #17405
base: main
Are you sure you want to change the base?
Conversation
…ion for merged copies Signed-off-by: Artem Ananev <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17405 +/- ##
============================================
+ Coverage 67.57% 68.74% +1.16%
- Complexity 22130 22589 +459
============================================
Files 2588 2610 +22
Lines 96654 97232 +578
Branches 10099 10130 +31
============================================
+ Hits 65318 66845 +1527
+ Misses 27589 26565 -1024
- Partials 3747 3822 +75
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
@@ -544,16 +558,13 @@ private void hashFlushMerge() { | |||
if (!copy.isImmutable()) { | |||
break; | |||
} | |||
boolean flushed = false; | |||
compact(copy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the core of the fix. Every copy, even if not the latest one, is first compacted if needed (if its estimated size exceeds the threshold). Then it can be either flushed (if the size is still more than the threshold after compaction, and the copy is the oldest) or merged (if the size is under threshold), or nothing (if the size exceeds the threshold, but the copy is not the oldest).
… to cover the case. A few other minor fixes Signed-off-by: Artem Ananev <[email protected]>
Signed-off-by: Artem Ananev <[email protected]>
Fix summary:
VirtualNodeCache.filterMutations()
, so it can now handle a case, when there is an old unreleased version of the cacheVirtualPipeline
, every virtual root copy is first compacted (if needed), then either flushed or merged. Previously compaction was only applied to copies, which are eligible to flushFixes: #17331
Signed-off-by: Artem Ananev [email protected]