Skip to content

Commit 606d3d6

Browse files
committed
fix
1 parent 4d48f87 commit 606d3d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ydb/core/kqp/runtime/kqp_compute_scheduler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,9 @@ class TSchedulerActor : public TActorBootstrapped<TSchedulerActor> {
434434
NActors::TExecutorPoolStats poolStats;
435435
TVector<NActors::TExecutorThreadStats> threadsStats;
436436
TlsActivationContext->ActorSystem()->GetPoolStats(SelfId().PoolID(), poolStats, threadsStats);
437-
Y_ENSURE(poolStats.MaxThreadCount > 0);
438-
Opts.Counters->SchedulerCapacity->Set(poolStats.MaxThreadCount);
439-
Opts.Scheduler->SetCapacity(poolStats.MaxThreadCount);
437+
ui64 threads = Max<ui64>(poolStats.MaxThreadCount, 1);
438+
Opts.Counters->SchedulerCapacity->Set(threads);
439+
Opts.Scheduler->SetCapacity(threads);
440440
}
441441

442442
STATEFN(State) {

0 commit comments

Comments
 (0)