chia7712 commented on code in PR #18749: URL: https://github.com/apache/kafka/pull/18749#discussion_r1938757450
########## coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRecordSerde.java: ########## @@ -76,6 +76,11 @@ public CoordinatorRecord deserialize( final ApiMessage valueMessage = apiMessageValueFor(recordType); final short valueVersion = readVersion(valueBuffer, "value"); + + if (valueVersion < valueMessage.lowestSupportedVersion() || valueVersion > valueMessage.highestSupportedVersion()) { + throw new UnknownRecordVersionException(recordType, valueVersion); + } Review Comment: The `UnknownRecordTypeException` is caught as the aborted upgrade might leave behind some "new" records. Should we also consider handling `UnknownRecordVersionException`? -- 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