@@ -85,6 +85,8 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
8585 SetPriorities (config.GetPoolsConfiguration ());
8686 }
8787 Scheduler.ReportCounters (counters);
88+ AdvanceTimeInterval = TDuration::MicroSeconds (config.GetComputeSchedulerSettings ().GetAdvanceTimeIntervalUsec ());
89+ Scheduler.SetForgetInterval (TDuration::MicroSeconds (config.GetComputeSchedulerSettings ().GetForgetOverflowTimeoutUsec ()));
8890 }
8991
9092 void Bootstrap () {
@@ -104,7 +106,7 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
104106 }
105107
106108 Schedule (TDuration::Seconds (1 ), new TEvents::TEvWakeup (WakeCleaunupTag));
107- Schedule (TDuration::MilliSeconds ( 50 ) , new TEvents::TEvWakeup (WakeAdvanceTimeTag));
109+ Schedule (AdvanceTimeInterval , new TEvents::TEvWakeup (WakeAdvanceTimeTag));
108110 Become (&TKqpNodeService::WorkState);
109111 }
110112
@@ -343,7 +345,7 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
343345 void HandleWork (TEvents::TEvWakeup::TPtr& ev) {
344346 if (ev->Get ()->Tag == WakeAdvanceTimeTag) {
345347 Scheduler.AdvanceTime (TMonotonic::Now ());
346- Schedule (TDuration::MilliSeconds ( 50 ) , new TEvents::TEvWakeup (WakeAdvanceTimeTag));
348+ Schedule (AdvanceTimeInterval , new TEvents::TEvWakeup (WakeAdvanceTimeTag));
347349 }
348350 if (ev->Get ()->Tag == WakeCleaunupTag) {
349351 Schedule (TDuration::Seconds (1 ), ev->Release ().Release ());
@@ -395,9 +397,11 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
395397 SetPriorities (event.GetConfig ().GetTableServiceConfig ().GetPoolsConfiguration ());
396398 }
397399
400+ AdvanceTimeInterval = TDuration::MicroSeconds (event.GetConfig ().GetTableServiceConfig ().GetComputeSchedulerSettings ().GetAdvanceTimeIntervalUsec ());
401+ Scheduler.SetForgetInterval (TDuration::MicroSeconds (event.GetConfig ().GetTableServiceConfig ().GetComputeSchedulerSettings ().GetForgetOverflowTimeoutUsec ()));
402+
398403 auto responseEv = MakeHolder<NConsole::TEvConsole::TEvConfigNotificationResponse>(event);
399404 Send (ev->Sender , responseEv.Release (), IEventHandle::FlagTrackDelivery, ev->Cookie );
400-
401405 }
402406
403407 void SetIteratorReadsQuotaSettings (const NKikimrConfig::TTableServiceConfig::TIteratorReadQuotaSettings& settings) {
@@ -520,6 +524,7 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
520524 const std::optional<TKqpFederatedQuerySetup> FederatedQuerySetup;
521525
522526 TComputeScheduler Scheduler;
527+ TDuration AdvanceTimeInterval;
523528
524529 // state sharded by TxId
525530 std::shared_ptr<TNodeServiceState> State_;
0 commit comments