dengziming commented on a change in pull request #11209: URL: https://github.com/apache/kafka/pull/11209#discussion_r800646883
########## File path: raft/src/main/java/org/apache/kafka/raft/RaftUtil.java ########## @@ -159,4 +161,18 @@ static boolean hasValidTopicPartition(DescribeQuorumRequestData data, TopicParti data.topics().get(0).partitions().size() == 1 && data.topics().get(0).partitions().get(0).partitionIndex() == topicPartition.partition(); } + + static boolean hasValidTopicPartition(FetchSnapshotRequestData data, TopicPartition topicPartition) { Review comment: I think this is a viable improvement, there are 11 similar methods here, so I changed them all and add a unit test for them. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org