Decouple expired object collector from epoch ticker#3582
Decouple expired object collector from epoch ticker#3582cthulhu-rider merged 4 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3582 +/- ##
==========================================
- Coverage 26.66% 26.60% -0.07%
==========================================
Files 654 655 +1
Lines 49374 49671 +297
==========================================
+ Hits 13168 13216 +48
- Misses 35161 35420 +259
+ Partials 1045 1035 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e54bfcc to
930fa98
Compare
roman-khimov
left a comment
There was a problem hiding this comment.
@cthulhu-rider, there can be some intersections with #3549.
pkg/local_object_storage/shard/gc.go
Outdated
| // currentEpoch stores the latest epoch announced via EventNewEpoch. | ||
| currentEpoch atomic.Uint64 | ||
| // expiredDone indicates that all expired objects up to currentEpoch were processed. | ||
| expiredDone atomic.Bool |
There was a problem hiding this comment.
I think another atomic.Uint64 would be more convenient, once you get no expired objects per some epoch you set it to this epoch value.
In fact point №3 of #3522 was to avoid this as well, but then it can mean iterating over a number of locked objects with each GC cycle, so some flag like this can still be handy.
well yeah, it added EC+GC tests. @End-rey u may try to rebase ur branch and see whether they still pass. They do most likely |
This reverts commit aca5584. The function was needed for immediate deletion of expired objects. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
160754c to
9753c88
Compare
Move the processing of expired objects from the epoch event handler to the regular GC cycle. The epoch event just sets some known epoch and marks that expired objects need to be processed. When the GC runs, a certain number of expired objects are immediately deleted (the limit is the same as for the GC). If no more expired objects are found, the GC no longer checks for their presence for the current epoch in subsequent ticks. Add GC remover sleep interval to the tests to track removal of expired objects. Closes #3522. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
9753c88 to
ca3742e
Compare
After #3582, GC does not work with `Inhume` calls and drops objects directly as it sees them expired. This breaks object counters since `Delete` call did not update them. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
After #3582, GC does not work with `Inhume` calls and drops objects directly as it sees them expired. This breaks object counters since `Delete` call did not update them. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Closes #3522.