From a82c8cc5b87c3511e75aec7f52289bea8175ad90 Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Mon, 27 May 2024 16:11:57 +0300 Subject: [PATCH] [#1147] gc: Execute callback for expired tombstones when they exists Signed-off-by: Anton Nikiforov --- pkg/local_object_storage/shard/gc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/local_object_storage/shard/gc.go b/pkg/local_object_storage/shard/gc.go index ef8e97d34..d605746e8 100644 --- a/pkg/local_object_storage/shard/gc.go +++ b/pkg/local_object_storage/shard/gc.go @@ -525,7 +525,9 @@ func (s *Shard) collectExpiredTombstones(ctx context.Context, e Event) { } log.Debug(logs.ShardHandlingExpiredTombstonesBatch, zap.Int("number", len(tssExp))) - s.expiredTombstonesCallback(ctx, tssExp) + if len(tssExp) > 0 { + s.expiredTombstonesCallback(ctx, tssExp) + } iterPrm.SetOffset(tss[tssLen-1].Address()) tss = tss[:0]