curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zili Chen <>
Subject Code question in LeaderLatch
Date Mon, 22 Jul 2019 09:44:52 GMT
Hi Curators,

I am reading the source code and in LeaderLatch#L592-603 it confuses
me that when we find the previous node gone, we reset to create a new
ephemeral sequential node for contending leadership.

My question is, supposed ourPath is latch-n2 and the previous node path
is latch-n1 where n1 is the largest number such that n1 < n2, if
latch-n1 gone, why not just call getChildren to check if n2 is the
leader or register another watch but we reset to create a new node?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message