forked from TrueCloudLab/frostfs-node
[#698] blobovnicza: Store counter values
Blobovnicza initialization take a long time because of bucket Stat() call. So now blobovnicza stores counters in META bucket. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
5e8c08da3e
commit
e54dc3dc7c
8 changed files with 152 additions and 7 deletions
|
@ -1,7 +1,6 @@
|
|||
package blobovnicza
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
|
@ -140,7 +139,7 @@ func (b *Blobovnicza) Iterate(ctx context.Context, prm IteratePrm) (IterateRes,
|
|||
|
||||
if err := b.boltDB.View(func(tx *bbolt.Tx) error {
|
||||
return tx.ForEach(func(bucketName []byte, buck *bbolt.Bucket) error {
|
||||
if bytes.Equal(bucketName, incompletedMoveBucketName) {
|
||||
if isNonDataBucket(bucketName) {
|
||||
return nil
|
||||
}
|
||||
return buck.ForEach(func(k, v []byte) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue