local_object_storage: Guarantee graves removal when handling expired tombstones #1481

Open
a-savchuk wants to merge 7 commits from a-savchuk/frostfs-node:remove-dangling-locks into master

7 commits

Author SHA1 Message Date
d63ff20078
[] shard/gc: Remove graves of new format separately
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-18 13:41:07 +03:00
cee94aae33
[] engine/test: Add test for GC handling of expired tombstones
Since the GC behavior is changing drastically. This test is needed
to ensure that the GC correctly deletes expired tombstones and graves.
The test uses graves of both old and new formats.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-18 13:41:07 +03:00
e119f35827
[] shard/gc: Collect expired objects of all types in one worker
Before, expired objects of each type were handled separately. Since
handling expired objects of each type is similar, let's use a common
function for that, collect and remove them in one worker.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-18 13:41:07 +03:00
ab1362c297
[] shard/gc: Remove object type from duration metric
Before, expired objects of each type were handled in separate
go-routines. Now expired objects of all types will be handled
in one go-routine. There's no way to use object type when writing
expired object handling duration metric, so remove object type
from this metric.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-18 13:41:06 +03:00
24709df702
[] shard/gc: Make handler and callback names more descriptive
Consider the following methods:
- `(*Shard).collectExpiredTombstones`
- `(*StorageEngines).processExpiredTombstones`
- `(*Shard).HandleExpiredTombstones`

All of them handle not tombstones but graves. `HandleExpiredTombstones`
in fact deletes tombstones but it does it based on graves it received.
So, rename all `...Tombstones` methods to `...Graves` method. It'll make
future changes in the garbage collector behavior simpler.

Also, rename all `...Locks` methods to `...LockObjects` because they
handle not locks but lock objects.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-18 13:41:05 +03:00
3cbd8be700
[] metabase/test: Add test for graves of new format
Test iterating over graveyard populated with graves of both old and
new formats, i. e. without and with an expiration epoch, respectively.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-18 13:41:05 +03:00
efec26b8ef
[] local_object_storage: Append expiration epoch to graves
In the near future the garbage collector will delete expired tombstones
and graves separately. So, all graves should have expiration epochs.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-18 13:41:04 +03:00