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>
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>
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>
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>
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>
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>