Skip to content

Commit 214207a

Browse files
authored
Merge 4efb289 into 6508540
2 parents 6508540 + 4efb289 commit 214207a

File tree

3 files changed

+358
-156
lines changed

3 files changed

+358
-156
lines changed

ydb/core/tx/schemeshard/schemeshard__operation_alter_extsubdomain.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -936,21 +936,23 @@ class TAlterExtSubDomain: public TSubOperation {
936936
// Create or derive alter.
937937
// (We could have always created new alter from a current subdomainInfo but
938938
// we need to take into account possible version increase from CreateHive suboperation.)
939-
auto createAlterFrom = [&inputSettings, &delta](auto prototype) {
939+
auto createAlterFrom = [&inputSettings](auto prototype, const TStoragePools& additionalPools) {
940940
return MakeIntrusive<TSubDomainInfo>(
941941
*prototype,
942942
inputSettings.GetPlanResolution(),
943943
inputSettings.GetTimeCastBucketsPerMediator(),
944-
delta.StoragePoolsAdded
944+
additionalPools
945945
);
946946
};
947947
TSubDomainInfo::TPtr alter = [&delta, &subdomainInfo, &createAlterFrom, &context]() {
948948
if (delta.AddExternalHive && context.SS->EnableAlterDatabaseCreateHiveFirst) {
949949
Y_ABORT_UNLESS(subdomainInfo->GetAlter());
950-
return createAlterFrom(subdomainInfo->GetAlter());
950+
//NOTE: existing alter already has all storage pools that combined operation wanted to add,
951+
// should not add them second time when deriving alter from alter
952+
return createAlterFrom(subdomainInfo->GetAlter(), {});
951953
} else {
952954
Y_ABORT_UNLESS(!subdomainInfo->GetAlter());
953-
return createAlterFrom(subdomainInfo);
955+
return createAlterFrom(subdomainInfo, delta.StoragePoolsAdded);
954956
}
955957
}();
956958

0 commit comments

Comments
 (0)