Merge pull request #26716 from nvartolomei/nv/part-cleanup-sequence

Avoid deleting old parts from FS on shutdown for replicated engine
This commit is contained in:
alesapin 2021-07-28 18:29:37 +03:00 committed by GitHub
commit 71169d7937
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4377,12 +4377,6 @@ void StorageReplicatedMergeTree::shutdown()
/// Wait for all of them /// Wait for all of them
std::unique_lock lock(data_parts_exchange_ptr->rwlock); std::unique_lock lock(data_parts_exchange_ptr->rwlock);
} }
/// We clear all old parts after stopping all background operations. It's
/// important, because background operations can produce temporary parts
/// which will remove themselves in their destructors. If so, we may have
/// race condition between our remove call and background process.
clearOldPartsFromFilesystem(true);
} }