mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 18:32:29 +00:00
check for active replicas when waiting for commands
This commit is contained in:
parent
b864bc49b9
commit
dd5435501a
@ -3844,9 +3844,15 @@ void StorageReplicatedMergeTree::waitForAllReplicasToProcessLogEntry(const Repli
|
|||||||
{
|
{
|
||||||
LOG_DEBUG(log, "Waiting for all replicas to process " << entry.znode_name);
|
LOG_DEBUG(log, "Waiting for all replicas to process " << entry.znode_name);
|
||||||
|
|
||||||
Strings replicas = getZooKeeper()->getChildren(zookeeper_path + "/replicas");
|
auto zookeeper = getZooKeeper()
|
||||||
|
Strings replicas = zookeeper->getChildren(zookeeper_path + "/replicas");
|
||||||
for (const String & replica : replicas)
|
for (const String & replica : replicas)
|
||||||
waitForReplicaToProcessLogEntry(replica, entry);
|
{
|
||||||
|
if (zookeeper->exists(zookeeper_path + "/replicas/" + replica + "/is_active"))
|
||||||
|
{
|
||||||
|
waitForReplicaToProcessLogEntry(replica, entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LOG_DEBUG(log, "Finished waiting for all replicas to process " << entry.znode_name);
|
LOG_DEBUG(log, "Finished waiting for all replicas to process " << entry.znode_name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user