lucasbru commented on code in PR #24098:
URL: https://github.com/apache/kafka/pull/24098#discussion_r4641164593
##########
tools/src/main/java/org/apache/kafka/tools/GroupOffsetsResetter.java:
##########
@@ -456,20 +457,32 @@ public void
checkAllTopicPartitionsValid(Collection<TopicPartition> partitionsTo
}
public List<TopicPartition>
filterNoneLeaderPartitions(Collection<TopicPartition> topicPartitions) {
Review Comment:
Treating a deleted topic or a missing partition as "no leader" makes the
name of this method misleading. `filterNonExistentPartitions` right below seems
like a better fit for that, though as far as I can tell it has the same
`allTopicNames()` problem. Could we fix it there, and have describe filter out
the non-existent partitions in addition to the leaderless ones?
Also, why is the describe code calling a function in `GroupOffsetsResetter`?
I know it already did before this PR, but now the streams describe is about to
depend on it too (#24193 copies this change). If we want to share this, it
should probably live somewhere else. That would also be a good place for a
single helper that does one `describeTopics` call and splits the partitions
into missing, leaderless and the rest, so describe doesn't need two round trips.
--
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]