mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #24809 from ClickHouse/fix_kill_mutation_wait
Fix mutation wait on mutation kill
This commit is contained in:
commit
b7c4f7dff8
@ -526,10 +526,11 @@ void StorageReplicatedMergeTree::waitMutationToFinishOnReplicas(
|
||||
if (wait_event->tryWait(1000))
|
||||
continue;
|
||||
|
||||
/// Here we check mutation for errors or kill on local replica. If they happen on this replica
|
||||
/// Here we check mutation for errors on local replica. If they happen on this replica
|
||||
/// they will happen on each replica, so we can check only in-memory info.
|
||||
auto mutation_status = queue.getIncompleteMutationsStatus(mutation_id);
|
||||
if (!mutation_status || !mutation_status->latest_fail_reason.empty())
|
||||
/// If mutation status is empty, than local replica may just not loaded it into memory.
|
||||
if (mutation_status && !mutation_status->latest_fail_reason.empty())
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user