@@ -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