Skip to content

Commit 7b14a92

Browse files
committed
add docs for handleRemoveVoterRequest
1 parent c9413cd commit 7b14a92

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,6 +2442,27 @@ private boolean handleRemoveVoterResponse(
24422442
}
24432443
}
24442444

2445+
/**
2446+
* Handle an UpdateVoter request. This API is used to update the metadata (endpoints
2447+
* and supported KRaft version range) of an existing voter in the quorum. The request
2448+
* should be sent to the current quorum leader, and will only succeed if the leader
2449+
* has committed its current epoch and HWM.
2450+
*
2451+
* This API may return the following errors:
2452+
*
2453+
* - {@link Errors#INCONSISTENT_CLUSTER_ID} if the cluster id is provided but does
2454+
* not match this cluster's id
2455+
* - {@link Errors#FENCED_LEADER_EPOCH} if the epoch is smaller than this node's epoch
2456+
* - {@link Errors#UNKNOWN_LEADER_EPOCH} if the epoch is larger than this node's epoch
2457+
* - {@link Errors#NOT_LEADER_OR_FOLLOWER} if the request was sent to a broker that
2458+
* is not the current quorum leader
2459+
* - {@link Errors#BROKER_NOT_AVAILABLE} if this node is currently shutting down
2460+
* - {@link Errors#REQUEST_TIMED_OUT} if the leader is still processing a previous
2461+
* voter change, or if the high watermark has not yet advanced
2462+
* - {@link Errors#INVALID_REQUEST} if the request does not include a valid voter id,
2463+
* directory id, endpoint, or KRaft version
2464+
* - {@link Errors#VOTER_NOT_FOUND} if the specified voter does not exist in the current set
2465+
*/
24452466
private CompletableFuture<UpdateRaftVoterResponseData> handleUpdateVoterRequest(
24462467
RaftRequest.Inbound requestMetadata,
24472468
long currentTimeMs

0 commit comments

Comments
 (0)