Skip to main content

Module voter_requests

Module voter_requests 

Source
Expand description

The KIP-853 request checks that AddRaftVoter, RemoveRaftVoter and UpdateRaftVoter share on the controller listener and on the broker listener, with Kafka’s codes, order and messages.

The order is that of KafkaRaftClient.handleAddVoterRequest, handleRemoveVoterRequest and handleUpdateVoterRequest: the cluster id, then the leader, then the voter key, then the endpoints. Each function answers None when the request passes, so the caller goes on to the reconfiguration itself.

Structs§

ListenerAddress
A listener as a request names it on the wire, borrowed from the request.

Enums§

VoterOperation
The voter operation a request asked for, which its refusal names as Kafka’s AddVoterHandler and RemoveVoterHandler do.

Constants§

DUPLICATE_VOTER
Kafka’s DUPLICATE_VOTER.
FENCED_LEADER_EPOCH
Kafka’s FENCED_LEADER_EPOCH.
INCONSISTENT_CLUSTER_ID
Kafka’s INCONSISTENT_CLUSTER_ID.
INVALID_REQUEST
Kafka’s INVALID_REQUEST.
NOT_LEADER_OR_FOLLOWER
Kafka’s NOT_LEADER_OR_FOLLOWER.
REQUEST_TIMED_OUT
Kafka’s REQUEST_TIMED_OUT.
UNKNOWN_LEADER_EPOCH
Kafka’s UNKNOWN_LEADER_EPOCH.
UNKNOWN_SERVER_ERROR
Kafka’s UNKNOWN_SERVER_ERROR.
UNSUPPORTED_VERSION
Kafka’s UNSUPPORTED_VERSION.
VOTER_NOT_FOUND
Kafka’s VOTER_NOT_FOUND.

Functions§

add_voter_refusal
The refusal of an AddRaftVoter request before the candidate probe, as KafkaRaftClient.handleAddVoterRequest orders it.
candidate_kraft_version_refusal
The refusal of a candidate whose kraft.version range does not cover the finalized version: INVALID_REQUEST, as AddVoterHandler answers it.
candidate_unavailable_refusal
The refusal of a candidate that could not be asked for its ApiVersions: REQUEST_TIMED_OUT, as AddVoterHandler answers it.
leader_listener_name
The name of the leader’s controller listener: Kafka’s channel.listenerName() on the leader, which a new or updated voter must advertise. It is None when this node does not know its own endpoints.
reconfiguration_refusal
The code and message of a reconfiguration’s outcome, for the voter (voter_id, directory_id) the request named.
remove_voter_refusal
The refusal of a RemoveRaftVoter request before the reconfiguration, as KafkaRaftClient.handleRemoveVoterRequest orders it.
replica_key
Kafka’s ReplicaKey.toString, with the directory id in Kafka’s base64 Uuid form.
update_voter_current_leader
UpdateRaftVoterResponse.CurrentLeader, as RaftUtil.updateVoterResponse fills it in every answer.
update_voter_refusal
The refusal code of an UpdateRaftVoter request before the reconfiguration, as KafkaRaftClient.handleUpdateVoterRequest and UpdateVoterHandler order it. The response carries no message.
valid_wire_listeners
A listener set is usable when every entry is named, hosted and on a real port, no name repeats, and there is at least one.

Type Aliases§

Refusal
An error code and the message beside it.