Merge pull request #49458 from ClickHouse/tavplubix-patch-6

Follow-up to #48792
This commit is contained in:
Alexander Tokmakov 2023-05-04 14:32:18 +03:00 committed by GitHub
commit 36f8fcdfaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -551,11 +551,11 @@ void StorageMergeTree::waitForMutation(Int64 version, const String & mutation_id
{
LOG_INFO(log, "Waiting mutation: {}", mutation_id);
{
auto check = [version, this]()
auto check = [version, wait_for_another_mutation, this]()
{
if (shutdown_called)
return true;
auto mutation_status = getIncompleteMutationsStatus(version);
auto mutation_status = getIncompleteMutationsStatus(version, nullptr, wait_for_another_mutation);
return !mutation_status || mutation_status->is_done || !mutation_status->latest_fail_reason.empty();
};