dajac commented on a change in pull request #11331: URL: https://github.com/apache/kafka/pull/11331#discussion_r744892585
########## File path: clients/src/main/java/org/apache/kafka/clients/FetchSessionHandler.java ########## @@ -301,7 +299,9 @@ public FetchRequestData build() { if (nextData != null) { // We basically check if the new partition had the same topic ID. If not, // we add it to the "replaced" set. - if (!prevData.topicId.equals(nextData.topicId) && !prevData.topicId.equals(Uuid.ZERO_UUID)) { + if (!prevData.topicId.equals(nextData.topicId) + && !prevData.topicId.equals(Uuid.ZERO_UUID) + && !nextData.topicId.equals(Uuid.ZERO_UUID)) { Review comment: Without this, when a topic id is set back to "zero", the former topic id is added to the replaced set which is a bit unintuitive, I think. In the end, it does not matter too much because the version is downgraded in this case so the replaced set is ignored. I was debating if it worth handling this case explicitly here. -- 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