Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When a broker first starts up, when it is in the INITIAL state, it will always "win" broker ID conflicts.  However, once it is granted a lease, it transitions out of the INITIAL state.  Thereafter, it may lose subsequent conflicts if its broker epoch is stale.  (See KIP-380 for some background on broker epoch.)  The reason for favoring new processes is to accommodate the common case where a process is killed with kill -9 and then restarted.  We want it to be able to reclaim its old ID quickly in this case.  The controller can generate a new broker epoch by using the latest log offset.

The Broker State Machine

This state machine ties together a few of the previous sections, such as broker registration and shutdown.

...