diff --git a/lib/storage/table.go b/lib/storage/table.go index 34d92fcab..0d64fad8d 100644 --- a/lib/storage/table.go +++ b/lib/storage/table.go @@ -444,10 +444,14 @@ func (tb *table) finalDedupWatcher() { currentPartitionName := timestampToPartitionName(timestamp) var ptwsToDedup []*partitionWrapper for _, ptw := range ptws { - if ptw.pt.name == currentPartitionName || !ptw.pt.isFinalDedupNeeded() { + if ptw.pt.name == currentPartitionName { // Do not run final dedup for the current month. continue } + if !ptw.pt.isFinalDedupNeeded() { + // There is no need to run final dedup for the given partition. + continue + } // mark partition with final deduplication marker ptw.pt.isDedupScheduled.Store(true) ptwsToDedup = append(ptwsToDedup, ptw)