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

when flushing write cache, ignore reclaims #581

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

jeffwashington
Copy link

Problem

reclaims are an old concept dating back to when we did not have the write cache. Reclaims are the bytes in an append vec which are now dead as a result of writing a second version of the same pubkey in the same append vec. The later entry supercedes the earlier one. When we are writing an append vec as a result of flushing the write cache, we only ever write each pubkey once. Thus, we do not need any reclaim behavior.

Summary of Changes

Ignore populating reclaims during write cache flushing.

Fixes #

@jeffwashington jeffwashington marked this pull request as ready for review April 4, 2024 19:33
@jeffwashington
Copy link
Author

@brooksprumo I should've caught this one several years ago.

Copy link

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

:shipit:

Nice find!

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (2c11b7a) to head (5bd88d5).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master     #581     +/-   ##
=========================================
- Coverage    81.8%    81.8%   -0.1%     
=========================================
  Files         849      849             
  Lines      229183   229253     +70     
=========================================
+ Hits       187585   187601     +16     
- Misses      41598    41652     +54     

@jeffwashington jeffwashington merged commit dcc195e into anza-xyz:master Apr 4, 2024
38 checks passed
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.

3 participants