Skip to content

Commit

Permalink
fix bugs about alter settings for data sharing disk
Browse files Browse the repository at this point in the history
  • Loading branch information
young-scott committed Oct 12, 2023
1 parent 1c591a7 commit a43945f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Storages/MergeTree/MergeTreeData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2540,7 +2540,7 @@ void MergeTreeData::changeSettings(
for (const String & disk_name : all_diff_disk_names)
{
auto disk = new_storage_policy->getDiskByName(disk_name);
if (disk->exists(relative_data_path))
if (!disk->supportDataSharing() && disk->exists(relative_data_path))
throw Exception("New storage policy contain disks which already contain data of a table with the same name", ErrorCodes::LOGICAL_ERROR);
}

Expand Down

0 comments on commit a43945f

Please sign in to comment.