Nodes can have repeated raft ID

Report a Dgraph Bug

What version of Dgraph are you using?

master

Have you tried reproducing the issue with the latest release?

no

What is the hardware spec (RAM, OS)?

Steps to reproduce the issue (command/config used to run Dgraph).

  1. Start cluster (with persistent data storage).
  2. Remove node 2.
  3. Set the id to 0 (auto assign).
  4. Restart the cluter with --force-recreate

At the end of this there are two nodes with id of 1.

Expected behaviour and actual result.

There are no nodes with the same ID.