From 512e97ddb341340602cb56db6ebdb2863544d371 Mon Sep 17 00:00:00 2001 From: Vladimir Chebotarev Date: Wed, 16 Oct 2019 22:01:50 +0300 Subject: [PATCH] Improved readability a little bit (`MergeTreeData::getActiveContainingPart`). --- dbms/src/Storages/MergeTree/MergeTreeData.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbms/src/Storages/MergeTree/MergeTreeData.cpp b/dbms/src/Storages/MergeTree/MergeTreeData.cpp index a470cc97bee..d31fc5cf3ad 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeData.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeData.cpp @@ -2488,12 +2488,12 @@ void MergeTreeData::throwInsertIfNeeded() const MergeTreeData::DataPartPtr MergeTreeData::getActiveContainingPart( const MergeTreePartInfo & part_info, MergeTreeData::DataPartState state, DataPartsLock & /*lock*/) { - auto committed_parts_range = getDataPartsStateRange(state); + auto current_state_parts_range = getDataPartsStateRange(state); /// The part can be covered only by the previous or the next one in data_parts. auto it = data_parts_by_state_and_info.lower_bound(DataPartStateAndInfo{state, part_info}); - if (it != committed_parts_range.end()) + if (it != current_state_parts_range.end()) { if ((*it)->info == part_info) return *it; @@ -2501,7 +2501,7 @@ MergeTreeData::DataPartPtr MergeTreeData::getActiveContainingPart( return *it; } - if (it != committed_parts_range.begin()) + if (it != current_state_parts_range.begin()) { --it; if ((*it)->info.contains(part_info))