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"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/tracing"
|
||||
|
@ -26,7 +25,7 @@ func (b *Blobovnicza) Exists(ctx context.Context, addr oid.Address) (bool, error
|
|||
|
||||
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
|
||||
}
|
||||
exists = buck.Get(addrKey) != nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue