This commit is contained in:
Alexander Tokmakov 2022-11-28 16:02:37 +01:00
parent a47e0b8f61
commit 0342e6b236
3 changed files with 4 additions and 4 deletions

View File

@ -4719,7 +4719,7 @@ std::unordered_set<String> MergeTreeData::getAllPartitionIds() const
{
auto lock = lockParts();
std::unordered_set<String> res;
String prev_id;
std::string_view prev_id;
for (const auto & part : getDataPartsStateRange(DataPartState::Active))
{
if (prev_id == part->info.partition_id)

View File

@ -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<const ReplicatedMergeTreeMutationEntry *> finished;
for (const auto & candidate : candidates)

View File

@ -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});