Skip to content

Commit

Permalink
YQ-3557 fixed unit test KqpLimits::ComputeActorMemoryAllocationFailur…
Browse files Browse the repository at this point in the history
…eQueryService with resource pools (ydb-platform#7873)
  • Loading branch information
GrigoriyPA authored Aug 16, 2024
1 parent 8796c8a commit d569f4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ydb/core/kqp/rm_service/kqp_rm_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,9 @@ class TKqpResourceManager : public IKqpResourceManager {
auto it = MemoryNamedPools.find(tx->MakePoolId());
if (it != MemoryNamedPools.end()) {
it->second->Release(resources.Memory);
}

if (it->second->GetUsed() == 0) {
MemoryNamedPools.erase(it);
if (it->second->GetUsed() == 0) {
MemoryNamedPools.erase(it);
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/kqp/ut/query/kqp_limits_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ Y_UNIT_TEST_SUITE(KqpLimits) {

app.MutableResourceBrokerConfig()->CopyFrom(MakeResourceBrokerTestConfig(4));

app.MutableFeatureFlags()->SetEnableResourcePools(true);

TKikimrRunner kikimr(app);
CreateLargeTable(kikimr, 0, 0, 0);

Expand Down

0 comments on commit d569f4b

Please sign in to comment.