mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Fix error
This commit is contained in:
parent
21897f2abd
commit
6f0db5ef10
@ -102,7 +102,11 @@ private:
|
||||
Coordination::Stat stat;
|
||||
zookeeper.get(path + "/" + child, &stat);
|
||||
if (!stat.ephemeralOwner)
|
||||
{
|
||||
ProfileEvents::increment(ProfileEvents::LeaderElectionAcquiredLeadership);
|
||||
handler();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
zookeeper.create(path + "/leader_election-", identifier, CreateMode::PersistentSequential);
|
||||
@ -124,7 +128,7 @@ private:
|
||||
|
||||
if (!stat.ephemeralOwner)
|
||||
{
|
||||
/// It is sequential node - we can become leader.
|
||||
/// It is persistent node - we can become leader.
|
||||
ProfileEvents::increment(ProfileEvents::LeaderElectionAcquiredLeadership);
|
||||
handler();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user