@@ -78,7 +78,8 @@ void TTopicPartitionOperations::AddOperation(const TString& topic, ui32 partitio
7878 Operations_[consumer].AddOperation (consumer, range);
7979}
8080
81- void TTopicPartitionOperations::AddOperation (const TString& topic, ui32 partition)
81+ void TTopicPartitionOperations::AddOperation (const TString& topic, ui32 partition,
82+ TMaybe<ui32> supportivePartition)
8283{
8384 Y_ABORT_UNLESS (Topic_.Empty () || Topic_ == topic);
8485 Y_ABORT_UNLESS (Partition_.Empty () || Partition_ == partition);
@@ -88,6 +89,8 @@ void TTopicPartitionOperations::AddOperation(const TString& topic, ui32 partitio
8889 Partition_ = partition;
8990 }
9091
92+ SupportivePartition_ = supportivePartition;
93+
9194 HasWriteOperations_ = true ;
9295}
9396
@@ -112,6 +115,9 @@ void TTopicPartitionOperations::BuildTopicTxs(THashMap<ui64, NKikimrPQ::TDataTra
112115 NKikimrPQ::TPartitionOperation* o = tx.MutableOperations ()->Add ();
113116 o->SetPartitionId (*Partition_);
114117 o->SetPath (*Topic_);
118+ if (SupportivePartition_.Defined ()) {
119+ o->SetSupportivePartition (*SupportivePartition_);
120+ }
115121 }
116122}
117123
@@ -127,6 +133,10 @@ void TTopicPartitionOperations::Merge(const TTopicPartitionOperations& rhs)
127133 TabletId_ = rhs.TabletId_ ;
128134 }
129135
136+ if (!SupportivePartition_.Defined () || (*SupportivePartition_ != Max<ui32>())) {
137+ SupportivePartition_ = rhs.SupportivePartition_ ;
138+ }
139+
130140 for (auto & [key, value] : rhs.Operations_ ) {
131141 Operations_[key].Merge (value);
132142 }
@@ -240,10 +250,11 @@ void TTopicOperations::AddOperation(const TString& topic, ui32 partition,
240250 HasReadOperations_ = true ;
241251}
242252
243- void TTopicOperations::AddOperation (const TString& topic, ui32 partition)
253+ void TTopicOperations::AddOperation (const TString& topic, ui32 partition,
254+ TMaybe<ui32> supportivePartition)
244255{
245256 TTopicPartition key{topic, partition};
246- Operations_[key].AddOperation (topic, partition);
257+ Operations_[key].AddOperation (topic, partition, supportivePartition );
247258 HasWriteOperations_ = true ;
248259}
249260
0 commit comments