[#863] blobovnicza: Fix counters
Some checks failed
DCO action / DCO (pull_request) Successful in 2m7s
Build / Build Components (1.21) (pull_request) Successful in 3m28s
Vulncheck / Vulncheck (pull_request) Failing after 3m8s
Build / Build Components (1.20) (pull_request) Successful in 4m1s
Tests and linters / Staticcheck (pull_request) Successful in 7m31s
Tests and linters / Lint (pull_request) Successful in 8m40s
Tests and linters / Tests (1.20) (pull_request) Successful in 20m43s
Tests and linters / Tests (1.21) (pull_request) Successful in 22m10s
Tests and linters / Tests with -race (pull_request) Successful in 22m35s
Some checks failed
DCO action / DCO (pull_request) Successful in 2m7s
Build / Build Components (1.21) (pull_request) Successful in 3m28s
Vulncheck / Vulncheck (pull_request) Failing after 3m8s
Build / Build Components (1.20) (pull_request) Successful in 4m1s
Tests and linters / Staticcheck (pull_request) Successful in 7m31s
Tests and linters / Lint (pull_request) Successful in 8m40s
Tests and linters / Tests (1.20) (pull_request) Successful in 20m43s
Tests and linters / Tests (1.21) (pull_request) Successful in 22m10s
Tests and linters / Tests with -race (pull_request) Successful in 22m35s
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)
|
count, size = updateValues(count, size)
|
||||||
|
|
||||||
buf := make([]byte, dataSizeAndItemsCountBufLength)
|
sizeBuf := make([]byte, dataSizeAndItemsCountBufLength)
|
||||||
binary.LittleEndian.PutUint64(buf, size)
|
binary.LittleEndian.PutUint64(sizeBuf, size)
|
||||||
if err := b.Put(dataSizeKey, buf); err != nil {
|
if err := b.Put(dataSizeKey, sizeBuf); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
binary.LittleEndian.PutUint64(buf, count)
|
countBuf := make([]byte, dataSizeAndItemsCountBufLength)
|
||||||
return b.Put(itemsCountKey, buf)
|
binary.LittleEndian.PutUint64(countBuf, count)
|
||||||
|
return b.Put(itemsCountKey, countBuf)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue