forked from TrueCloudLab/frostfs-node
[#863] blobovnicza: Fix counters
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c8683554cd
commit
e39db63827
1 changed files with 6 additions and 5 deletions
|
@ -92,12 +92,13 @@ func updateMeta(tx *bbolt.Tx, updateValues func(count, size uint64) (uint64, uin
|
|||
|
||||
count, size = updateValues(count, size)
|
||||
|
||||
buf := make([]byte, dataSizeAndItemsCountBufLength)
|
||||
binary.LittleEndian.PutUint64(buf, size)
|
||||
if err := b.Put(dataSizeKey, buf); err != nil {
|
||||
sizeBuf := make([]byte, dataSizeAndItemsCountBufLength)
|
||||
binary.LittleEndian.PutUint64(sizeBuf, size)
|
||||
if err := b.Put(dataSizeKey, sizeBuf); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
binary.LittleEndian.PutUint64(buf, count)
|
||||
return b.Put(itemsCountKey, buf)
|
||||
countBuf := make([]byte, dataSizeAndItemsCountBufLength)
|
||||
binary.LittleEndian.PutUint64(countBuf, count)
|
||||
return b.Put(itemsCountKey, countBuf)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue