forked from TrueCloudLab/frostfs-node
[#1094] blobovnicza: calculate size in Init
properly
If pre-existing blobovnicza is initialized, it's size should be updated even if all buckets are in place. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
418b553920
commit
651adf46c6
3 changed files with 19 additions and 43 deletions
|
@ -33,9 +33,7 @@ func (b *Blobovnicza) iterateBounds(f func(uint64, uint64) (bool, error)) error
|
|||
for upper := firstBucketBound; upper <= max(objLimitBound, firstBucketBound); upper *= 2 {
|
||||
var lower uint64
|
||||
|
||||
if upper == firstBucketBound {
|
||||
lower = 0
|
||||
} else {
|
||||
if upper != firstBucketBound {
|
||||
lower = upper/2 + 1
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue