Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Provide some more details on tooling support

...

When the admin calls the alterQuorum, underlying the thread will first send a FindQuorumRequest to find the stable leader. If that call times out or the group is in the election, the call would fail and inform user to retry. Once the leader is found, AdminClient will send AlterQuorumRequest to it. If the returned error is retriable like NOT_QUORUM_LEADER, the tool will perform a rediscovery of the quorum leader. For fatal errors such as authorization errors, the call would fail and inform user the result.

...

Tooling Support

kafka-reassignWe will add a new utility called kafka-quorum.sh will be implemented to inspect and create quorum reassignments.

The --describe flag

There will be a flag --describe which will list all of the current quorum reassignments to reflect the reassignment result described above.

The --new-voter-ids flag

...

 to describe and alter quorum state. As usual, this tool will require --bootstrap-server to be provided.  We will support the following options:

--describe 

There will be two options available with --describe: 

  • --describe status: a short summary of the quorum status and the other provides detailed information about the status of replication.
  • --describe replication: provides detailed information about the status of replication

Here are a couple examples:

Code Block
> bin/kafka-quorum.sh --describe
LeaderId:				0
LeaderEpoch: 			15
HighWatermark:			234130
MaxFollowerLag: 		34
MaxFollowerLagTimeMs:	15
CurrentVoters:			[0, 1, 2]
TargetVoters:			[0, 3, 4]

> bin/kafka-quorum.sh --describe replication
ReplicaId	LogEndOffset	Lag		LagTimeMs	Status		IsReassignTarget
0			234134			0		0			Leader		Yes
1			234130			4		10			Follower	No
2			234100			34		15			Follower	No
3			234124			10		12			Observer	Yes
4			234130			4		15			Observer	Yes

--alter

Initially, the only purpose of this API is to perform reassignments. In the future, there may be additional uses. Below is an example usage:

Code Block
> bin/kafka-quorum.sh --alter --voters 0,3,4
CurrentVoters:			[0, 1, 2]
TargetVoters:			[0, 3, 4]


Client Interactions

Since this specific quorum implementation is only to be used by Kafka internally, we do not need to add new public protocols for clients. More specifically, the leader of the quorum would act as the controller of the cluster, and any client requests that requires updating the metadata (previously stored in ZK) would be interpreted as appending new record(s) to the quorum's internal log.

...