mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Merge pull request #39922 from ClickHouse/fix_flaky_tests_commit_obsolete_part
Fix flaky tests (`Tried to commit obsolete part`)
This commit is contained in:
commit
25a9bf5deb
@ -5009,7 +5009,13 @@ MergeTreeData::DataPartsVector MergeTreeData::Transaction::commit(MergeTreeData:
|
||||
DataPartsVector covered_parts = data.getActivePartsToReplace(part->info, part->name, covering_part, *owing_parts_lock);
|
||||
if (covering_part)
|
||||
{
|
||||
LOG_WARNING(data.log, "Tried to commit obsolete part {} covered by {}", part->name, covering_part->getNameWithState());
|
||||
/// It's totally fine for zero-level parts, because of possible race condition between ReplicatedMergeTreeSink and
|
||||
/// background queue execution (new part is added to ZK before this function is called,
|
||||
/// so other replica may produce covering part and replication queue may download covering part).
|
||||
if (part->info.level)
|
||||
LOG_WARNING(data.log, "Tried to commit obsolete part {} covered by {}", part->name, covering_part->getNameWithState());
|
||||
else
|
||||
LOG_INFO(data.log, "Tried to commit obsolete part {} covered by {}", part->name, covering_part->getNameWithState());
|
||||
|
||||
part->remove_time.store(0, std::memory_order_relaxed); /// The part will be removed without waiting for old_parts_lifetime seconds.
|
||||
data.modifyPartState(part, DataPartState::Outdated);
|
||||
|
Loading…
Reference in New Issue
Block a user