aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkruall <kruall@yandex-team.ru>2022-03-15 13:36:25 +0300
committerkruall <kruall@yandex-team.ru>2022-03-15 13:36:25 +0300
commit5a3e494d4427e02569d9381cbb1ff68a8ab69092 (patch)
tree6df17703fbbee93dea4b5370d4e68c13fe65dc6b
parent094638589de6a6c9f91fad0005843fc1c1adc957 (diff)
downloadydb-5a3e494d4427e02569d9381cbb1ff68a8ab69092.tar.gz
Change the order of parititions in solomon volume description, KIKIMR-13851
ref:afd69b5d085935edded479e3867f2cb42c1295a0
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_path_describer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/ydb/core/tx/schemeshard/schemeshard_path_describer.cpp b/ydb/core/tx/schemeshard/schemeshard_path_describer.cpp
index 4b178640bf6..0f974f6ea9a 100644
--- a/ydb/core/tx/schemeshard/schemeshard_path_describer.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_path_describer.cpp
@@ -524,12 +524,17 @@ void TPathDescriber::DescribeSolomonVolume(TPathId pathId, TPathElement::TPtr pa
entry->SetPathId(pathId.LocalPathId);
entry->SetPartitionCount(solomonVolumeInfo->Partitions.size());
+ entry->MutablePartitions()->Reserve(entry->GetPartitionCount());
+ for (ui32 idx = 0; idx < entry->GetPartitionCount(); ++idx) {
+ entry->AddPartitions();
+ }
+
for (const auto& partition: solomonVolumeInfo->Partitions) {
auto shardId = partition.first;
auto shardInfo = Self->ShardInfos.FindPtr(shardId);
Y_VERIFY(shardInfo);
- auto part = entry->AddPartitions();
+ auto part = entry->MutablePartitions()->Mutable(partition.second->PartitionId);
part->SetPartitionId(partition.second->PartitionId);
part->SetShardIdx(ui64(shardId.GetLocalId()));
auto tabletId = partition.second->TabletId;