lib/storage/table.go: reduce the difference with enterprise branch

This commit is contained in:
Aliaksandr Valialkin 2024-03-30 03:22:51 +02:00
parent b6d1d6982e
commit ae6190f0b5
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

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