[#1147] gc: Execute callback for expired tombstones when they exists

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2024-05-27 16:11:57 +03:00 committed by Evgenii Stratonikov
parent d355274cd0
commit a82c8cc5b8

View file

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