[ https://issues.apache.org/jira/browse/KAFKA-17264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872852#comment-17872852 ]
zhengke zhou commented on KAFKA-17264: -------------------------------------- [~jsancio] , In KPI-853, for the AddVoter#request, RemoveVoter#request, and UpdateVoter#request, I've noticed that many fields currently do not exist in the Kafka design. For example: {code:java} // AddVoter#request { "apiKey": 77, "type": "request", "listeners": ["controller", "broker"], "name": "RemoveVoterRequest", "validVersions": "0", "flexibleVersions": "0+", "fields": [ ... { "name": "TopicName", "type": "string", "versions": "0+", "entityType": "topicName", "about": "The name of the topic" }, { "name": "TopicId", "type": "uuid", "versions": "0+", "about": "The unique topic ID" }, { "name": "Partition", "type": "int32", "versions": "0+", "about": "The partition index" }, ... ] } {code} I believe it would be prudent to add validation to ensure consistency, such as checking that the listeners specified in the add, remove, and update requests actually exist. Additionally, for fields like {{{}Listener#port{}}}, there should be validation to ensure values fall within valid ranges (e.g., {{Listener#port}} should be between 0 and 65535). Could you please assign this task to me? Thank you! > Audit validation of the new RPCs (AddVoter, RemoveVoter and UpdateVoter) > ------------------------------------------------------------------------ > > Key: KAFKA-17264 > URL: https://issues.apache.org/jira/browse/KAFKA-17264 > Project: Kafka > Issue Type: Sub-task > Reporter: José Armando García Sancio > Priority: Major > > It is possible the the kafka raft client driver thread throws uncaught > exceptions for some inputs. KRaft should instead be catching this validation > errors and returning INVALID_REQUEST errors in the response. -- This message was sent by Atlassian Jira (v8.20.10#820010)