From f685cf2268a0fe28754201b0eb9e16c1346daf68 Mon Sep 17 00:00:00 2001 From: alesapin Date: Fri, 24 Jun 2022 17:33:43 +0200 Subject: [PATCH] Fix comment --- src/Storages/MergeTree/MergeTreeData.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeData.h b/src/Storages/MergeTree/MergeTreeData.h index adc9c78d516..72d029942ef 100644 --- a/src/Storages/MergeTree/MergeTreeData.h +++ b/src/Storages/MergeTree/MergeTreeData.h @@ -549,10 +549,7 @@ public: /// Renames temporary part to a permanent part and adds it to the parts set. /// It is assumed that the part does not intersect with existing parts. - /// If increment != nullptr, part index is determining using increment. Otherwise part index remains unchanged. - /// If out_transaction != nullptr, adds the part in the PreActive state (the part will be added to the - /// active set later with out_transaction->commit()). - /// Else, commits the part immediately. + /// Adds the part in the PreActive state (the part will be added to the active set later with out_transaction->commit()). /// Returns true if part was added. Returns false if part is covered by bigger part. bool renameTempPartAndAdd( MutableDataPartPtr & part, @@ -561,16 +558,16 @@ public: /// The same as renameTempPartAndAdd but the block range of the part can contain existing parts. /// Returns all parts covered by the added part (in ascending order). - /// If out_transaction == nullptr, marks covered parts as Outdated. + DataPartsVector renameTempPartAndReplace( + MutableDataPartPtr & part, + Transaction & out_transaction); + + /// Unlocked version of previous one. Useful when added multiple parts with a single lock. DataPartsVector renameTempPartAndReplaceUnlocked( MutableDataPartPtr & part, Transaction & out_transaction, DataPartsLock & lock); - DataPartsVector renameTempPartAndReplace( - MutableDataPartPtr & part, - Transaction & out_transaction); - /// Remove parts from working set immediately (without wait for background /// process). Transfer part state to temporary. Have very limited usage only /// for new parts which aren't already present in table. @@ -1249,7 +1246,7 @@ private: /// in precommited state and to transasction void preparePartForCommit(MutableDataPartPtr & part, Transaction & out_transaction, bool need_rename); - /// Low-level method for preparing parts for commit. + /// Low-level method for preparing parts for commit (in-memory). /// FIXME Merge MergeTreeTransaction and Transaction bool renameTempPartAndReplaceImpl( MutableDataPartPtr & part, @@ -1257,7 +1254,6 @@ private: DataPartsLock & lock, DataPartsVector * out_covered_parts); - /// RAII Wrapper for atomic work with currently moving parts /// Acquire them in constructor and remove them in destructor /// Uses data.currently_moving_parts_mutex