kevin-wu24 commented on code in PR #23185:
URL: https://github.com/apache/kafka/pull/23185#discussion_r3806843434
##########
raft/src/main/java/org/apache/kafka/raft/RaftUtil.java:
##########
@@ -715,6 +715,14 @@ static boolean hasValidTopicPartition(FetchResponseData
data, TopicPartition top
data.responses().get(0).partitions().get(0).partitionIndex() ==
topicPartition.partition();
}
+ static boolean hasValidTopicPartition(FetchSnapshotRequestData data) {
+ return data.topics().size() == 1 &&
data.topics().get(0).partitions().size() == 1;
+ }
+
+ static boolean hasValidTopicPartition(FetchSnapshotResponseData data) {
Review Comment:
They are equivalent, but FetchSnapshotRequestData and
FetchSnapshotResponseData are distinct classes.
--
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]