Fix user object counter #911
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#911
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/user_counter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates #904
The bug was caused by two problems:
Inhume
operation.put
process and the replicator. Because of this, the counter was increased twice. I fixed that.fix/user_counterto Fix user object counter@ -221,6 +221,7 @@ func TestBlobstorFailback(t *testing.T) {
checkShardState(t, te.ng, te.shards[0].id, 0, mode.ReadWrite)
checkShardState(t, te.ng, te.shards[1].id, 0, mode.ReadWrite)
require.NoError(t, te.ng.Close(context.Background()))
Why not do it in defer, similar to other changes in the recent refactoring?
There are two
te
instances created, first instance is closed by regular function call, so I decided to do the same way with the second instance.@ -87,2 +89,3 @@
err = db.boltDB.Batch(func(tx *bbolt.Tx) error {
return db.put(tx, prm.obj, prm.id, nil, currEpoch)
var e error
res, e = db.put(tx, prm.obj, prm.id, nil, currEpoch)
What about a unit test for this?
Done
6399c194a7
tofda9af98fc
fda9af98fc
to63d3ed1ad8