@@ -4,15 +4,17 @@ namespace NKikimr {
44namespace NPQ {
55
66TPartitionScaleRequest::TPartitionScaleRequest (
7- TString topicName,
8- TString databasePath,
7+ const TString& topicName,
8+ const TString& topicPath,
9+ const TString& databasePath,
910 ui64 pathId,
1011 ui64 pathVersion,
11- std::vector<NKikimrSchemeOp::TPersQueueGroupDescription_TPartitionSplit> splits,
12- const std::vector<NKikimrSchemeOp::TPersQueueGroupDescription_TPartitionMerge> merges,
13- NActors::TActorId parentActorId
12+ const std::vector<NKikimrSchemeOp::TPersQueueGroupDescription_TPartitionSplit>& splits,
13+ const std::vector<NKikimrSchemeOp::TPersQueueGroupDescription_TPartitionMerge>& merges,
14+ const NActors::TActorId& parentActorId
1415)
1516 : Topic(topicName)
17+ , TopicPath(topicPath)
1618 , DatabasePath(databasePath)
1719 , PathId(pathId)
1820 , PathVersion(pathVersion)
@@ -30,24 +32,27 @@ void TPartitionScaleRequest::Bootstrap(const NActors::TActorContext &ctx) {
3032void TPartitionScaleRequest::SendProposeRequest (const NActors::TActorContext &ctx) {
3133 auto proposal = std::make_unique<TEvTxUserProxy::TEvProposeTransaction>();
3234 proposal->Record .SetDatabaseName (CanonizePath (DatabasePath));
33- FillProposeRequest (*proposal, DatabasePath, Topic, ctx);
35+ FillProposeRequest (*proposal, ctx);
3436 ctx.Send (MakeTxProxyID (), proposal.release ());
3537}
3638
37- void TPartitionScaleRequest::FillProposeRequest (TEvTxUserProxy::TEvProposeTransaction& proposal, const TString& workingDir, const TString& topicName, const NActors::TActorContext &ctx) {
39+ void TPartitionScaleRequest::FillProposeRequest (TEvTxUserProxy::TEvProposeTransaction& proposal, const NActors::TActorContext &ctx) {
40+ auto workingDir = TopicPath.substr (0 , TopicPath.size () - Topic.size ());
41+
3842 auto & modifyScheme = *proposal.Record .MutableTransaction ()->MutableModifyScheme ();
3943 modifyScheme.SetOperationType (NKikimrSchemeOp::ESchemeOpAlterPersQueueGroup);
4044 modifyScheme.SetWorkingDir (workingDir);
45+ modifyScheme.SetInternal (true );
4146
4247 auto applyIf = modifyScheme.AddApplyIf ();
4348 applyIf->SetPathId (PathId);
4449 applyIf->SetPathVersion (PathVersion == 0 ? 1 : PathVersion);
4550 applyIf->SetCheckEntityVersion (true );
4651
4752 NKikimrSchemeOp::TPersQueueGroupDescription groupDescription;
48- groupDescription.SetName (topicName );
53+ groupDescription.SetName (Topic );
4954 TStringBuilder logMessage;
50- logMessage << " TPartitionScaleRequest::FillProposeRequest trying to scale partitions. Spilts: " ;
55+ logMessage << " TPartitionScaleRequest::FillProposeRequest trying to scale partitions of ' " << workingDir << " / " << Topic << " ' . Spilts: " ;
5156 for (const auto & split: Splits) {
5257 auto * newSplit = groupDescription.AddSplit ();
5358 logMessage << " partition: " << split.GetPartition () << " boundary: '" << split.GetSplitBoundary () << " ' " ;
0 commit comments