From 131f35709826cc45d71944160729253139e856a7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 30 Mar 2024 03:22:51 +0200 Subject: [PATCH] lib/storage/table.go: reduce the difference with enterprise branch --- lib/storage/table.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)