jsancio commented on code in PR #18240:
URL: https://github.com/apache/kafka/pull/18240#discussion_r1890678659


##########
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java:
##########
@@ -883,6 +923,13 @@ private boolean handleVoteResponse(
         VoteResponseData response = (VoteResponseData) responseMetadata.data();
         Errors topLevelError = Errors.forCode(response.errorCode());
         if (topLevelError != Errors.NONE) {
+            if (topLevelError == Errors.UNSUPPORTED_VERSION && 
quorum.isProspective()) {
+                logger.warn("Prospective received unsupported version error in 
vote response in epoch {}, " +
+                        "transitioning to Candidate state immediately since 
entire quorum does not support PreVote.",
+                    quorum.epoch());

Review Comment:
   > But I'm wondering about the case where a controller quorum is left 
partially upgraded on accident. Would having a warning log make this situation 
more discoverable?
   
   Yeah. This would be interesting to monitor but cluster are not really 
monitored by looking at the log. Clusters are monitored by collecting and 
comparing metrics.
   
   This is an issue beyond KRaft and should be solved holistically. Kafka could 
have a metrics that fires if the API versions and supported features don't 
match across all of the replicas. This metric would require a KIP to implement.
   
   Having said that, we should keep this message but it should not be logged at 
WARN. It should be logged at INFO.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to