diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 4ac2d9b711c..2b627bf13d9 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -4719,7 +4719,7 @@ std::unordered_set MergeTreeData::getAllPartitionIds() const { auto lock = lockParts(); std::unordered_set res; - String prev_id; + std::string_view prev_id; for (const auto & part : getDataPartsStateRange(DataPartState::Active)) { if (prev_id == part->info.partition_id) diff --git a/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp b/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp index 87cddabe4dd..1f3aac57969 100644 --- a/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp +++ b/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp @@ -1888,7 +1888,7 @@ bool ReplicatedMergeTreeQueue::tryFinalizeMutations(zkutil::ZooKeeperPtr zookeep for (const auto & partitions : candidate->block_numbers) partition_ids_hint.insert(partitions.first); - auto merge_pred = getMergePredicate(zookeeper, /* partition_ids_hint */ {}); + auto merge_pred = getMergePredicate(zookeeper, std::move(partition_ids_hint)); std::vector finished; for (const auto & candidate : candidates) diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index 45c17e4e33e..7c9ca3187bf 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -7066,7 +7066,7 @@ void StorageReplicatedMergeTree::movePartitionToShard( throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Part {} does not have an uuid assigned and it can't be moved between shards", part_name); - ReplicatedMergeTreeMergePredicate merge_pred = queue.getMergePredicate(zookeeper, {part_info.partition_id}); + ReplicatedMergeTreeMergePredicate merge_pred = queue.getMergePredicate(zookeeper, PartitionIdsHint{part_info.partition_id}); /// The following block is pretty much copy & paste from StorageReplicatedMergeTree::dropPart to avoid conflicts while this is WIP. /// Extract it to a common method and re-use it before merging. @@ -7274,7 +7274,7 @@ bool StorageReplicatedMergeTree::dropPartImpl( while (true) { - ReplicatedMergeTreeMergePredicate merge_pred = queue.getMergePredicate(zookeeper, {part_info.partition_id}); + ReplicatedMergeTreeMergePredicate merge_pred = queue.getMergePredicate(zookeeper, PartitionIdsHint{part_info.partition_id}); auto part = getPartIfExists(part_info, {MergeTreeDataPartState::Active});