Skip to content

Commit dc51156

Browse files
committed
PoolId -> GroupId
1 parent d56a31d commit dc51156

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ydb/core/kqp/runtime/kqp_compute_scheduler.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class TSchedulerEntity {
241241
};
242242

243243
struct TComputeScheduler::TImpl {
244-
THashMap<TString, size_t> PoolId;
244+
THashMap<TString, size_t> GroupId;
245245
std::vector<std::unique_ptr<TSchedulerEntity::TGroupRecord>> Records;
246246

247247
double SumCores;
@@ -273,7 +273,7 @@ struct TComputeScheduler::TImpl {
273273
group->Share = maxShare;
274274
if (groupName) {
275275
group->Name = *groupName;
276-
PoolId[*groupName] = Records.size();
276+
GroupId[*groupName] = Records.size();
277277
}
278278
AdvanceTime(now, group.get());
279279
Records.push_back(std::move(group));
@@ -308,15 +308,15 @@ struct TComputeScheduler::TImpl {
308308
Records.swap(records);
309309

310310
std::vector<TString> toerase;
311-
for (auto& [k, v] : PoolId) {
311+
for (auto& [k, v] : GroupId) {
312312
if (remap[v] >= 0) {
313313
v = remap[v];
314314
} else {
315315
toerase.push_back(k);
316316
}
317317
}
318318
for (auto& k: toerase) {
319-
PoolId.erase(k);
319+
GroupId.erase(k);
320320
}
321321

322322
for (auto& record : Records) {
@@ -343,8 +343,8 @@ void TComputeScheduler::AddToGroup(TMonotonic now, ui64 id, TSchedulerEntityHand
343343
}
344344

345345
TSchedulerEntityHandle TComputeScheduler::Enroll(TString groupName, i64 weight, TMonotonic now) {
346-
Y_ENSURE(Impl->PoolId.contains(groupName), "unknown scheduler group");
347-
auto id = Impl->PoolId.at(groupName);
346+
Y_ENSURE(Impl->GroupId.contains(groupName), "unknown scheduler group");
347+
auto id = Impl->GroupId.at(groupName);
348348

349349
TSchedulerEntityHandle result{new TSchedulerEntity()};
350350
(*result).Weight = weight;
@@ -412,7 +412,7 @@ ui64 TComputeScheduler::MakeAnonymousGroup(TMonotonic now, double share, std::op
412412
Impl->CreateGroup(share, now);
413413
ui64 res = Impl->Records.size() - 1;
414414
if (baseGroup) {
415-
auto id = Impl->PoolId.at(*baseGroup);
415+
auto id = Impl->GroupId.at(*baseGroup);
416416
Impl->Records[res]->BaseGroup = id;
417417
Impl->AdvanceTime(now, Impl->Records[res].get());
418418
}
@@ -456,13 +456,13 @@ void TComputeScheduler::SetForgetInterval(TDuration period) {
456456
}
457457

458458
bool TComputeScheduler::Disabled(TString group) {
459-
auto ptr = Impl->PoolId.FindPtr(group);
459+
auto ptr = Impl->GroupId.FindPtr(group);
460460
return !ptr || Impl->Records[*ptr]->MutableStats.Current().get()->Disabled;
461461
}
462462

463463

464464
bool TComputeScheduler::Disable(TString group, TMonotonic now) {
465-
auto ptr = Impl->PoolId.FindPtr(group);
465+
auto ptr = Impl->GroupId.FindPtr(group);
466466
if (Impl->Records[*ptr]->MutableStats.Current().get()->EntitiesWeight > 0) {
467467
return false;
468468
}
@@ -472,7 +472,7 @@ bool TComputeScheduler::Disable(TString group, TMonotonic now) {
472472
}
473473

474474
void TComputeScheduler::UpdateMaxShare(TString group, double share, TMonotonic now) {
475-
auto ptr = Impl->PoolId.FindPtr(group);
475+
auto ptr = Impl->GroupId.FindPtr(group);
476476
if (!ptr) {
477477
Impl->CreateGroup(share, now, group);
478478
} else {

0 commit comments

Comments
 (0)