@@ -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
@@ -341,7 +343,7 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
341343 void HandleWork (TEvents::TEvWakeup::TPtr& ev) {
342344 if (ev->Get ()->Tag == WakeAdvanceTimeTag) {
343345 Scheduler.AdvanceTime (TMonotonic::Now ());
344- Schedule (TDuration::MilliSeconds ( 50 ) , new TEvents::TEvWakeup (WakeAdvanceTimeTag));
346+ Schedule (AdvanceTimeInterval , new TEvents::TEvWakeup (WakeAdvanceTimeTag));
345347 }
346348 if (ev->Get ()->Tag == WakeCleaunupTag) {
347349 Schedule (TDuration::Seconds (1 ), ev->Release ().Release ());
@@ -393,9 +395,11 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
393395 SetPriorities (event.GetConfig ().GetTableServiceConfig ().GetPoolsConfiguration ());
394396 }
395397
398+ AdvanceTimeInterval = TDuration::MicroSeconds (event.GetConfig ().GetTableServiceConfig ().GetComputeSchedulerSettings ().GetAdvanceTimeIntervalUsec ());
399+ Scheduler.SetForgetInterval (TDuration::MicroSeconds (event.GetConfig ().GetTableServiceConfig ().GetComputeSchedulerSettings ().GetForgetOverflowTimeoutUsec ()));
400+
396401 auto responseEv = MakeHolder<NConsole::TEvConsole::TEvConfigNotificationResponse>(event);
397402 Send (ev->Sender , responseEv.Release (), IEventHandle::FlagTrackDelivery, ev->Cookie );
398-
399403 }
400404
401405 void SetIteratorReadsQuotaSettings (const NKikimrConfig::TTableServiceConfig::TIteratorReadQuotaSettings& settings) {
@@ -518,6 +522,7 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
518522 const std::optional<TKqpFederatedQuerySetup> FederatedQuerySetup;
519523
520524 TComputeScheduler Scheduler;
525+ TDuration AdvanceTimeInterval;
521526
522527 // state sharded by TxId
523528 std::shared_ptr<TNodeServiceState> State_;
0 commit comments