11#pragma once
22#include " engines/changes/abstract/compaction_info.h"
33#include " engines/portions/meta.h"
4+ #include < ydb/core/base/appdata.h>
45
56namespace NKikimr ::NOlap {
67class TColumnEngineChanges ;
@@ -14,7 +15,7 @@ class TBackgroundController {
1415
1516 using TCurrentCompaction = THashMap<ui64, NOlap::TPlanCompactionInfo>;
1617 TCurrentCompaction ActiveCompactionInfo;
17- THashMap<ui64, TInstant> LastCompactionFinishInstants; // pathId to finish time
18+ THashMap<ui64, TInstant> LastCompactionFinishByPathId;
1819
1920 bool ActiveCleanupPortions = false ;
2021 bool ActiveCleanupTables = false ;
@@ -30,8 +31,8 @@ class TBackgroundController {
3031 bool StartCompaction (const NOlap::TPlanCompactionInfo& info);
3132 void FinishCompaction (const NOlap::TPlanCompactionInfo& info) {
3233 Y_ABORT_UNLESS (ActiveCompactionInfo.erase (info.GetPathId ()));
33- TInstant& lastFinishInstant = LastCompactionFinishInstants [info.GetPathId ()];
34- lastFinishInstant = std::max (lastFinishInstant, TInstant:: Now ());
34+ TInstant& lastFinishInstant = LastCompactionFinishByPathId [info.GetPathId ()];
35+ lastFinishInstant = std::max (lastFinishInstant, TAppData::TimeProvider-> Now ());
3536 }
3637 const TCurrentCompaction& GetActiveCompaction () const {
3738 return ActiveCompactionInfo;
@@ -40,7 +41,6 @@ class TBackgroundController {
4041 return ActiveCompactionInfo.size ();
4142 }
4243 TInstant GetLastCompactionFinishInstant (ui64 pathId) const ;
43- TInstant GetLastCompactionFinishInstant () const ;
4444
4545 void StartIndexing (const NOlap::TColumnEngineChanges& changes);
4646 void FinishIndexing (const NOlap::TColumnEngineChanges& changes);
0 commit comments