Skip to content

Commit 9c9e21f

Browse files
authored
Removed unused BalancerTabletID (#21648)
1 parent 0ad6e12 commit 9c9e21f

File tree

7 files changed

+12
-19
lines changed

7 files changed

+12
-19
lines changed

ydb/core/persqueue/ut/pqrb_describes_ut.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Y_UNIT_TEST_SUITE(TPQRBDescribes) {
1515
ui32 totalPartitions = 5;
1616
server.AnnoyingClient->CreateTopic(topicName, totalPartitions);
1717

18-
auto pathDescr = server.AnnoyingClient->Ls(topicPath)->Record.GetPathDescription().GetSelf();
19-
20-
ui64 balancerTabletId = pathDescr.GetBalancerTabletID();
2118
auto* runtime = server.CleverServer->GetRuntime();
2219
const auto edge = runtime->AllocateEdgeActor();
20+
21+
auto pathDescr = server.AnnoyingClient->Describe(runtime, topicPath).GetPathDescription().GetPersQueueGroup();
22+
ui64 balancerTabletId = pathDescr.GetBalancerTabletID();
2323

2424
auto checkResponse = [&](TEvPersQueue::TEvGetPartitionsLocation* request, bool ok, ui64 partitionsCount = 0) {
2525
runtime->SendToPipe(balancerTabletId, edge, request);

ydb/core/persqueue/ut/slow/autopartitioning_ut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Y_UNIT_TEST_SUITE(SlowTopicAutopartitioning) {
4141
}
4242

4343
ui64 GetBalancerTabletId(TTopicSdkTestSetup& setup, const TString& topicPath) {
44-
auto pathDescr = setup.GetServer().AnnoyingClient->Ls(topicPath)->Record.GetPathDescription().GetSelf();
44+
auto pathDescr = setup.GetServer().AnnoyingClient->Describe(&setup.GetRuntime(), topicPath).GetPathDescription().GetPersQueueGroup();
4545
auto balancerTabletId = pathDescr.GetBalancerTabletID();
4646
Cerr << ">>>>> BalancerTabletID=" << balancerTabletId << Endl << Flush;
4747
UNIT_ASSERT(balancerTabletId);

ydb/core/persqueue/ut/ut_with_sdk/autoscaling_ut.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -963,9 +963,9 @@ Y_UNIT_TEST_SUITE(TopicAutoscaling) {
963963
}
964964

965965
ui64 GetBalancerTabletId(TTopicSdkTestSetup& setup, const TString& topicPath) {
966-
auto pathDescr = setup.GetServer().AnnoyingClient->Ls(topicPath)->Record.GetPathDescription().GetSelf();
967-
auto balancerTabletId = pathDescr.GetBalancerTabletID();
968-
Cerr << ">>>>> BalancerTabletID=" << balancerTabletId << Endl << Flush;
966+
auto pathDescr = setup.GetServer().AnnoyingClient->Describe(&setup.GetRuntime(), topicPath, Tests::SchemeRoot, true);
967+
auto balancerTabletId = pathDescr.GetPathDescription().GetPersQueueGroup().GetBalancerTabletID();
968+
Cerr << ">>>>> TopicPath=" << topicPath << " BalancerTabletID=" << balancerTabletId << " describe=" << pathDescr.DebugString() << Endl;
969969
UNIT_ASSERT(balancerTabletId);
970970
return balancerTabletId;
971971
}

ydb/core/protos/flat_scheme_op.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,7 @@ message TDirEntry {
19641964
optional TPathVersion Version = 15;
19651965
optional bool ChildrenExist = 16;
19661966

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

19701970
// Describes single partition (range or point) of a table

ydb/core/testlib/test_client.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2763,9 +2763,10 @@ namespace Tests {
27632763
return res;
27642764
}
27652765

2766-
NKikimrScheme::TEvDescribeSchemeResult TClient::Describe(TTestActorRuntime* runtime, const TString& path, ui64 tabletId) {
2766+
NKikimrScheme::TEvDescribeSchemeResult TClient::Describe(TTestActorRuntime* runtime, const TString& path, ui64 tabletId, bool showPrivateTable) {
27672767
TAutoPtr<NSchemeShard::TEvSchemeShard::TEvDescribeScheme> request(new NSchemeShard::TEvSchemeShard::TEvDescribeScheme());
27682768
request->Record.SetPath(path);
2769+
request->Record.MutableOptions()->SetShowPrivateTable(showPrivateTable);
27692770
const ui64 schemeRoot = GetPatchedSchemeRoot(tabletId, Domain, SupportsRedirect);
27702771
TActorId sender = runtime->AllocateEdgeActor(0);
27712772
ForwardToTablet(*runtime, schemeRoot, sender, request.Release(), 0);

ydb/core/testlib/test_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ namespace Tests {
588588
ui32 FlatQueryRaw(TTestActorRuntime* runtime, const TString &query, TFlatQueryOptions& opts, NKikimrClient::TResponse& response, int retryCnt = 10);
589589

590590
bool Compile(const TString &mkql, TString &compiled);
591-
NKikimrScheme::TEvDescribeSchemeResult Describe(TTestActorRuntime* runtime, const TString& path, ui64 tabletId = SchemeRoot);
591+
NKikimrScheme::TEvDescribeSchemeResult Describe(TTestActorRuntime* runtime, const TString& path, ui64 tabletId = SchemeRoot, bool showPrivateTable = false);
592592
TString CreateStoragePool(const TString& poolKind, const TString& partOfName, ui32 groups = 1);
593593
NKikimrBlobStorage::TDefineStoragePool DescribeStoragePool(const TString& name);
594594
void RemoveStoragePool(const TString& name);

ydb/core/tx/schemeshard/schemeshard_path_describer.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,7 @@ void TPathDescriber::FillChildDescr(NKikimrSchemeOp::TDirEntry* descr, TPathElem
186186
descr->SetChildrenExist(pathEl->GetAliveChildren() > 0);
187187
}
188188

189-
if (pathEl->PathType == NKikimrSchemeOp::EPathTypePersQueueGroup) {
190-
auto it = Self->Topics.FindPtr(pathEl->PathId);
191-
Y_ABORT_UNLESS(it, "PersQueueGroup is not found");
192-
193-
TTopicInfo::TPtr pqGroupInfo = *it;
194-
if (pqGroupInfo->HasBalancer()) {
195-
descr->SetBalancerTabletID(ui64(pqGroupInfo->BalancerTabletID));
196-
}
197-
} else {
189+
if (pathEl->PathType != NKikimrSchemeOp::EPathTypePersQueueGroup) {
198190
descr->SetACL(pathEl->ACL); // YDBOPS-1328
199191
}
200192
}

0 commit comments

Comments
 (0)