@@ -192,6 +192,10 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
192192 ev->Get ()->Record .GetSerializedGUCSettings () : " " ;
193193
194194 auto schedulerNow = TlsActivationContext->Monotonic ();
195+ std::optional<ui64> querySchedulerGroup;
196+ if (msg.HasQueryCpuShare ()) {
197+ querySchedulerGroup = Scheduler->MakeAnonymousGroup (schedulerNow, msg.GetQueryCpuShare ());
198+ }
195199
196200 // start compute actors
197201 TMaybe<NYql::NDqProto::TRlPath> rlPath = Nothing ();
@@ -219,7 +223,7 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
219223 };
220224
221225 if (SchedulerOptions.Scheduler ->Disabled (group)) {
222- auto share = msg.GetMaxCpuShare ();
226+ auto share = msg.GetPoolMaxCpuShare ();
223227 if (share > 0 ) {
224228 Scheduler->UpdateMaxShare (group, share, schedulerNow);
225229 Send (SchedulerActorId, new TEvSchedulerNewPool (msg.GetDatabase (), group, share));
@@ -230,6 +234,9 @@ class TKqpNodeService : public TActorBootstrapped<TKqpNodeService> {
230234
231235 if (!schedulingTaskOptions.NoThrottle ) {
232236 schedulingTaskOptions.Handle = SchedulerOptions.Scheduler ->Enroll (schedulingTaskOptions.Group , schedulingTaskOptions.Weight , schedulingTaskOptions.Now );
237+ if (querySchedulerGroup) {
238+ Scheduler->AddToGroup (schedulerNow, *querySchedulerGroup, schedulingTaskOptions.Handle );
239+ }
233240 }
234241
235242 auto result = CaFactory_->CreateKqpComputeActor ({
0 commit comments