Merge pull request #32037 from excitoon-favorites/flexiblemutations3

Minor fixes for `StorageMergeTree`
This commit is contained in:
alesapin 2021-12-01 13:36:46 +03:00 committed by GitHub
commit 4b3079b0a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1077,7 +1077,7 @@ Int64 StorageMergeTree::getUpdatedDataVersion(
return part->info.getDataVersion();
}
Int64 StorageMergeTree::getCurrentMutationVersion(
UInt64 StorageMergeTree::getCurrentMutationVersion(
const DataPartPtr & part,
std::unique_lock<std::mutex> & currently_processing_in_background_mutex_lock) const
{

View File

@ -192,10 +192,14 @@ private:
std::shared_ptr<MergeMutateSelectedEntry> selectPartsToMutate(const StorageMetadataPtr & metadata_snapshot, String * disable_reason, TableLockHolder & table_lock_holder, std::unique_lock<std::mutex> & currently_processing_in_background_mutex_lock, bool & were_some_mutations_for_some_parts_skipped);
Int64 getCurrentMutationVersion(
/// For current mutations queue, returns maximum version of mutation for a part,
/// with respect of mutations which would not change it.
/// Returns 0 if there is no such mutation in active status.
UInt64 getCurrentMutationVersion(
const DataPartPtr & part,
std::unique_lock<std::mutex> & /* currently_processing_in_background_mutex_lock */) const;
/// Returns maximum version of a part, with respect of mutations which would not change it.
Int64 getUpdatedDataVersion(
const DataPartPtr & part,
std::unique_lock<std::mutex> & /* currently_processing_in_background_mutex_lock */) const;