Trigger queue extry processing after ALTER TABLE REPLACE/MOVE PARTITION

This commit is contained in:
Aleksei Filatov 2024-11-18 08:57:15 +00:00
parent 98cd45153d
commit 9dd9c227e5

View File

@ -8180,6 +8180,9 @@ void StorageReplicatedMergeTree::replacePartitionFrom(
++idx;
}
/// Force execution of inserted log entries, because it could be delayed at BackgroundPool.
background_operations_assignee.trigger();
for (const auto & entry : entries)
waitForLogEntryToBeProcessedIfNecessary(*entry, query_context);
}
@ -8720,6 +8723,9 @@ void StorageReplicatedMergeTree::movePartitionToTable(const StoragePtr & dest_ta
parts_holder.clear();
cleanup_thread.wakeup();
/// Force execution of inserted log entries, because it could be delayed at BackgroundPool.
background_operations_assignee.trigger();
waitForLogEntryToBeProcessedIfNecessary(entry_delete, query_context);
/// Cleaning possibly stored information about parts from /quorum/last_part node in ZooKeeper.