@@ -194,6 +194,10 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
194194 ev->Get ()->Record .GetSerializedGUCSettings () : " " ;
195195
196196 auto schedulerNow = TlsActivationContext->Monotonic ();
197+ std::optional<ui64> querySchedulerGroup;
198+ if (msg.HasQueryCpuShare ()) {
199+ querySchedulerGroup = Scheduler->MakeAnonymousGroup (schedulerNow, msg.GetQueryCpuShare ());
200+ }
197201
198202 // start compute actors
199203 TMaybe<NYql::NDqProto::TRlPath> rlPath = Nothing ();
@@ -221,7 +225,7 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
221225 };
222226
223227 if (SchedulerOptions.Scheduler ->Disabled (group)) {
224- auto share = msg.GetMaxCpuShare ();
228+ auto share = msg.GetPoolMaxCpuShare ();
225229 if (share > 0 ) {
226230 Scheduler->UpdateMaxShare (group, share, schedulerNow);
227231 Send (SchedulerActorId, new TEvSchedulerNewPool (msg.GetDatabase (), group, share));
@@ -232,6 +236,9 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
232236
233237 if (!schedulingTaskOptions.NoThrottle ) {
234238 schedulingTaskOptions.Handle = SchedulerOptions.Scheduler ->Enroll (schedulingTaskOptions.Group , schedulingTaskOptions.Weight , schedulingTaskOptions.Now );
239+ if (querySchedulerGroup) {
240+ Scheduler->AddToGroup (schedulerNow, *querySchedulerGroup, schedulingTaskOptions.Handle );
241+ }
235242 }
236243
237244 auto result = CaFactory_->CreateKqpComputeActor ({
0 commit comments