atomix icon indicating copy to clipboard operation
atomix copied to clipboard

Stopping leader then running leader election on remaining nodes returns leader = stopped node

Open ssteiner opened this issue 4 years ago • 0 comments

Expected behavior

When I orderly stop the node that is the current leader, I expect to get an event on the other nodes telling them that the current leader is no more. When I then run a leader election on the remaining node, I expect that node to be promoted because the current leader can no longer respond.

Actual behavior

No leader change is observed when I stop the current leader. And when I manually run another election on the remaining node, it still returns the id of the node that I just stopped.

Steps to reproduce

Steps to reproduce the behavior.

Here's a sample that registers two nodes, starts them up and uses a distributed map and leader election. Main.java has some comments indicating the behavior I'm expecting and what I'm actually observing. https://github.com/ssteiner/AtomixTester

After line 48 in Main.java I'd expect to see a leadership change and running line 49 should dump "New leader is member1" to the console.

Environment

  • Atomix: [e.g. 3.1.8]
  • OS: [Windows 10 1909]
  • JVM [openjdk version "14.0.1" 2020-04-14]

ssteiner avatar Sep 09 '20 14:09 ssteiner