Skip to content

24-3: schemeshard: fix enable_alter_database_create_hive_first mode #10098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -936,21 +936,23 @@ class TAlterExtSubDomain: public TSubOperation {
// Create or derive alter.
// (We could have always created new alter from a current subdomainInfo but
// we need to take into account possible version increase from CreateHive suboperation.)
auto createAlterFrom = [&inputSettings, &delta](auto prototype) {
auto createAlterFrom = [&inputSettings](auto prototype, const TStoragePools& additionalPools) {
return MakeIntrusive<TSubDomainInfo>(
*prototype,
inputSettings.GetPlanResolution(),
inputSettings.GetTimeCastBucketsPerMediator(),
delta.StoragePoolsAdded
additionalPools
);
};
TSubDomainInfo::TPtr alter = [&delta, &subdomainInfo, &createAlterFrom, &context]() {
if (delta.AddExternalHive && context.SS->EnableAlterDatabaseCreateHiveFirst) {
Y_ABORT_UNLESS(subdomainInfo->GetAlter());
return createAlterFrom(subdomainInfo->GetAlter());
//NOTE: existing alter already has all storage pools that combined operation wanted to add,
// should not add them second time when deriving alter from alter
return createAlterFrom(subdomainInfo->GetAlter(), {});
} else {
Y_ABORT_UNLESS(!subdomainInfo->GetAlter());
return createAlterFrom(subdomainInfo);
return createAlterFrom(subdomainInfo, delta.StoragePoolsAdded);
}
}();

Expand Down
Loading
Loading