Expand mutable local blobstore to full capacity#343
Merged
Conversation
Fix a bug where mutable local blobstore doesn't extend the "current" blocks section to the configured number. Consider an action cache configuration with old=8, current=24 and new=1. Previous erroneous behaviour would initialize a fresh node with old,current,new=0,0,0 and the steady state would be old,current,new=8,0,1. When restarting the storage where 9 blocks had been persisted, it would be initialized with old,current,new=0,8,1 and get the steady state old,current,new=8,8,1. After a couple of restarts, it would reach full capacity.
Contributor
Author
|
Log for old behaviour: Log for new behaviour: |
Member
|
Great find! I guess this is caused by the addition of BlockListGrowthPolicy. In the past LocalBlobAccess would always just extend the number of "new" blocks in the loop above. But for the AC/... this is not allowed, as it would prevent overwrites from being reliable. |
Member
|
Thanks! |
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.
Fix a bug where mutable local blobstore doesn't extend the "current" blocks section to the configured number.
Consider an action cache configuration with old=8, current=24 and new=1. Previous erroneous behaviour would initialize a fresh node with
old,current,new=0,0,0and the steady state would beold,current,new=8,0,1. When restarting the storage where 9 blocks had been persisted, it would be initialized withold,current,new=0,8,1and get the steady stateold,current,new=8,8,1. After a couple of restarts, it would reach full capacity.