Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Revert #39737 #46309

Merged
merged 2 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 2 additions & 15 deletions src/Storages/StorageReplicatedMergeTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1795,8 +1795,7 @@ bool StorageReplicatedMergeTree::executeFetch(LogEntry & entry, bool need_to_che
/* to_detached= */ false,
entry.quorum,
/* zookeeper_ */ nullptr,
/* try_fetch_shared= */ true,
entry.znode_name))
/* try_fetch_shared= */ true))
{
return false;
}
Expand Down Expand Up @@ -3963,8 +3962,7 @@ bool StorageReplicatedMergeTree::fetchPart(
bool to_detached,
size_t quorum,
zkutil::ZooKeeper::Ptr zookeeper_,
bool try_fetch_shared,
String entry_znode)
bool try_fetch_shared)
{
auto zookeeper = zookeeper_ ? zookeeper_ : getZooKeeper();
const auto part_info = MergeTreePartInfo::fromPartName(part_name, format_version);
Expand Down Expand Up @@ -4161,17 +4159,6 @@ bool StorageReplicatedMergeTree::fetchPart(
ProfileEvents::increment(ProfileEvents::ObsoleteReplicatedParts);
}

/// It is possible that fetched parts may cover other parts (see
/// findReplicaHavingCoveringPart()), and if those covered parts
/// cannot be executed right now (due to MERGE_PARTS that covers
/// them is in progress), replica delay will be increased until
/// those entries will be executed (if covered operations
/// finishes) in other words until MERGE_PARTS is in progress,
/// while this can take awhile.
///
/// So let's just remove them from the queue.
queue.removePartProducingOpsInRange(zookeeper, part->info, /* covering_entry= */ {}, entry_znode);

write_part_log({});
}
else
Expand Down
3 changes: 1 addition & 2 deletions src/Storages/StorageReplicatedMergeTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,7 @@ class StorageReplicatedMergeTree final : public MergeTreeData
bool to_detached,
size_t quorum,
zkutil::ZooKeeper::Ptr zookeeper_ = nullptr,
bool try_fetch_shared = true,
String entry_znode = "");
bool try_fetch_shared = true);

/** Download the specified part from the specified replica.
* Used for replace local part on the same s3-shared part in hybrid storage.
Expand Down