Versions Compared

Key

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

...

For the purpose of this section, handling a registration request or a broker heartbeat request are both considered forms of contact (even if the broker is fenced).

Broker Leases

Once a broker has completed log recovery and registered with the controller, its next goal is to transition from registered+fenced to registered+active.  It can do this by sending a broker heartbeat request to the active controller with ShouldFence = false.

When the broker first starts up, it doesn't want to be unfenced immediately.  The reason is because it needs time to perform log recovery and some other startup tasks.  It is good for the broker to be fenced during this time, so that clients do not try to contact it and fail.  The broker indicates that it is not ready to be unfenced by setting ShouldFence = true in the heartbeats it sends out during this period.

Once the broker is ready to be unfenced, it starts setting ShouldFence = false in the heartbeats it sends out.  This makes it eligible Once the broker sets ShouldFence = false, it becomes eligible for unfencing.  However, the controller will not actually unfence it the broker unless its metadata is also reasonably current.  It will determine The controller determines this by checking examining the metadata offset in the heartbeat request.

...