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
|
@ -73,7 +73,9 @@ func (b *Blobovnicza) Put(ctx context.Context, prm PutPrm) (PutRes, error) {
|
|||
return fmt.Errorf("(%T) could not save object in bucket: %w", b, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
return updateMeta(tx, func(count, size uint64) (uint64, uint64) {
|
||||
return count + 1, size + upperBound
|
||||
})
|
||||
})
|
||||
if err == nil {
|
||||
b.itemAdded(upperBound)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue