Fix complex object deletion #348
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#348
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/complex_object_lifetime"
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?
To physically delete complex object we need parent with physical objects, not only parent.
Closes #332
0c8f198e3e
to529bde2861
529bde2861
to3e585c4176
3e585c4176
to84694ad465
Please update CHANGELOG.
84694ad465
to3bcd9f0fd5
Done
LGTM
@ -0,0 +25,4 @@
}
result[addr] = []oid.Address{}
bkt := tx.Bucket(parentBucketName(addr.Container(), buffer[:]))
why the slicing (
[:]
) here? it's already a slice.fixed
@ -0,0 +35,4 @@
return err
}
if len(binObjIDs) == 0 {
why the check? the next loop won't do anything anyway.
done
@ -115,6 +75,8 @@ func Test_GCDropsLockedExpiredObject(t *testing.T) {
epoch.Value = 105
sh.NotificationChannel() <- shard.EventNewEpoch(epoch.Value)
time.Sleep(1 * time.Second) //wait GC completes
this is unfortunate...isn't there another way? (same below)
Looks ugly, I agree. But there are two async processes: one for expired objects collecting, second for physically delete expired objects.
I'm not sure what to do about it, but it would be nice to look at it some other time.
@ -125,0 +180,4 @@
}, 3*time.Second, 1*time.Second, "expired complex object must be deleted on epoch after lock expires")
}
func createAndInitGCTestShard(t *testing.T, epoch *epochState) *shard.Shard {
we have already some very similar functionality. Can we avoid the duping?
https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/pkg/local_object_storage/shard/shard_test.go#L36
done
3bcd9f0fd5
toa0a9455fec
@ -115,6 +65,8 @@ func Test_GCDropsLockedExpiredObject(t *testing.T) {
epoch.Value = 105
sh.NotificationChannel() <- shard.EventNewEpoch(epoch.Value)
time.Sleep(1 * time.Second) //wait GC completes
Can we do it more reliably? It will break at some point, e.g. with -race flag on CI.
It will be too hard. First we need to wait expired objects collection completes. Then we need to wait GC completed.
just dropped this wait
@ -34,3 +39,3 @@
}
func newCustomShard(t testing.TB, rootPath string, enableWriteCache bool, wcOpts []writecache.Option, bsOpts []blobstor.Option) *shard.Shard {
func newCustomShard(t testing.TB, rootPath string, enableWriteCache bool, wcOpts []writecache.Option, bsOpts []blobstor.Option,
We already have options for writecache and blobstor. What about also having options for a metabase instead?
fixed
a0a9455fec
to107b6b8780
107b6b8780
to76ee54fddb