Skip to content

Removed unused BalancerTabletID #21648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ydb/core/persqueue/ut/pqrb_describes_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Y_UNIT_TEST_SUITE(TPQRBDescribes) {
ui32 totalPartitions = 5;
server.AnnoyingClient->CreateTopic(topicName, totalPartitions);

auto pathDescr = server.AnnoyingClient->Ls(topicPath)->Record.GetPathDescription().GetSelf();

ui64 balancerTabletId = pathDescr.GetBalancerTabletID();
auto* runtime = server.CleverServer->GetRuntime();
const auto edge = runtime->AllocateEdgeActor();

auto pathDescr = server.AnnoyingClient->Describe(runtime, topicPath).GetPathDescription().GetPersQueueGroup();
ui64 balancerTabletId = pathDescr.GetBalancerTabletID();

auto checkResponse = [&](TEvPersQueue::TEvGetPartitionsLocation* request, bool ok, ui64 partitionsCount = 0) {
runtime->SendToPipe(balancerTabletId, edge, request);
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/persqueue/ut/slow/autopartitioning_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Y_UNIT_TEST_SUITE(SlowTopicAutopartitioning) {
}

ui64 GetBalancerTabletId(TTopicSdkTestSetup& setup, const TString& topicPath) {
auto pathDescr = setup.GetServer().AnnoyingClient->Ls(topicPath)->Record.GetPathDescription().GetSelf();
auto pathDescr = setup.GetServer().AnnoyingClient->Describe(&setup.GetRuntime(), topicPath).GetPathDescription().GetPersQueueGroup();
auto balancerTabletId = pathDescr.GetBalancerTabletID();
Cerr << ">>>>> BalancerTabletID=" << balancerTabletId << Endl << Flush;
UNIT_ASSERT(balancerTabletId);
Expand Down
6 changes: 3 additions & 3 deletions ydb/core/persqueue/ut/ut_with_sdk/autoscaling_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,9 +963,9 @@ Y_UNIT_TEST_SUITE(TopicAutoscaling) {
}

ui64 GetBalancerTabletId(TTopicSdkTestSetup& setup, const TString& topicPath) {
auto pathDescr = setup.GetServer().AnnoyingClient->Ls(topicPath)->Record.GetPathDescription().GetSelf();
auto balancerTabletId = pathDescr.GetBalancerTabletID();
Cerr << ">>>>> BalancerTabletID=" << balancerTabletId << Endl << Flush;
auto pathDescr = setup.GetServer().AnnoyingClient->Describe(&setup.GetRuntime(), topicPath, Tests::SchemeRoot, true);
auto balancerTabletId = pathDescr.GetPathDescription().GetPersQueueGroup().GetBalancerTabletID();
Cerr << ">>>>> TopicPath=" << topicPath << " BalancerTabletID=" << balancerTabletId << " describe=" << pathDescr.DebugString() << Endl;
UNIT_ASSERT(balancerTabletId);
return balancerTabletId;
}
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/protos/flat_scheme_op.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1963,7 +1963,7 @@ message TDirEntry {
optional TPathVersion Version = 15;
optional bool ChildrenExist = 16;

optional uint64 BalancerTabletID = 999; //temporary optimization for old PQ read/write protocol. Must be removed later
reserved 999;
}

// Describes single partition (range or point) of a table
Expand Down
3 changes: 2 additions & 1 deletion ydb/core/testlib/test_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2763,9 +2763,10 @@ namespace Tests {
return res;
}

NKikimrScheme::TEvDescribeSchemeResult TClient::Describe(TTestActorRuntime* runtime, const TString& path, ui64 tabletId) {
NKikimrScheme::TEvDescribeSchemeResult TClient::Describe(TTestActorRuntime* runtime, const TString& path, ui64 tabletId, bool showPrivateTable) {
TAutoPtr<NSchemeShard::TEvSchemeShard::TEvDescribeScheme> request(new NSchemeShard::TEvSchemeShard::TEvDescribeScheme());
request->Record.SetPath(path);
request->Record.MutableOptions()->SetShowPrivateTable(showPrivateTable);
const ui64 schemeRoot = GetPatchedSchemeRoot(tabletId, Domain, SupportsRedirect);
TActorId sender = runtime->AllocateEdgeActor(0);
ForwardToTablet(*runtime, schemeRoot, sender, request.Release(), 0);
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/testlib/test_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ namespace Tests {
ui32 FlatQueryRaw(TTestActorRuntime* runtime, const TString &query, TFlatQueryOptions& opts, NKikimrClient::TResponse& response, int retryCnt = 10);

bool Compile(const TString &mkql, TString &compiled);
NKikimrScheme::TEvDescribeSchemeResult Describe(TTestActorRuntime* runtime, const TString& path, ui64 tabletId = SchemeRoot);
NKikimrScheme::TEvDescribeSchemeResult Describe(TTestActorRuntime* runtime, const TString& path, ui64 tabletId = SchemeRoot, bool showPrivateTable = false);
TString CreateStoragePool(const TString& poolKind, const TString& partOfName, ui32 groups = 1);
NKikimrBlobStorage::TDefineStoragePool DescribeStoragePool(const TString& name);
void RemoveStoragePool(const TString& name);
Expand Down
10 changes: 1 addition & 9 deletions ydb/core/tx/schemeshard/schemeshard_path_describer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,7 @@ void TPathDescriber::FillChildDescr(NKikimrSchemeOp::TDirEntry* descr, TPathElem
descr->SetChildrenExist(pathEl->GetAliveChildren() > 0);
}

if (pathEl->PathType == NKikimrSchemeOp::EPathTypePersQueueGroup) {
auto it = Self->Topics.FindPtr(pathEl->PathId);
Y_ABORT_UNLESS(it, "PersQueueGroup is not found");

TTopicInfo::TPtr pqGroupInfo = *it;
if (pqGroupInfo->HasBalancer()) {
descr->SetBalancerTabletID(ui64(pqGroupInfo->BalancerTabletID));
}
} else {
if (pathEl->PathType != NKikimrSchemeOp::EPathTypePersQueueGroup) {
descr->SetACL(pathEl->ACL); // YDBOPS-1328
}
}
Expand Down
Loading