cmccabe commented on code in PR #14719: URL: https://github.com/apache/kafka/pull/14719#discussion_r1394832061
########## core/src/main/scala/kafka/server/metadata/ZkMetadataCache.scala: ########## @@ -376,6 +436,24 @@ class ZkMetadataCache( // This method returns the deleted TopicPartitions received from UpdateMetadataRequest def updateMetadata(correlationId: Int, updateMetadataRequest: UpdateMetadataRequest): Seq[TopicPartition] = { inWriteLock(partitionMetadataLock) { + if (updateMetadataRequest.updateType() == AbstractControlRequest.Type.FULL) { + if (updateMetadataRequest.version() < 8) { + stateChangeLogger.error(s"Received UpdateMetadataRequest with Type=FULL (2), but at version " + + s"${updateMetadataRequest.version()}. Not treating this as a full metadata update") + } else if (!zkMigrationEnabled) { Review Comment: Hmm, I don't really know if this check makes sense. It seems like if we have `updateMetadataRequest.isKRaftController == true` and `type == FULL` we should just treat it as full UMR. If the zk controller managed to fake all that, then we're already well off the rails and error log4j messages won't help much. -- 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