jolshan commented on code in PR #16719:
URL: https://github.com/apache/kafka/pull/16719#discussion_r2646226606


##########
core/src/main/scala/kafka/coordinator/transaction/TransactionLog.scala:
##########
@@ -78,17 +79,16 @@ object TransactionLog {
 
     // Serialize with version 0 (highest non-flexible version) until 
transaction.version 1 is enabled
     // which enables flexible fields in records.
-    val version: Short =
-      if (usesFlexibleRecords) 1 else 0
-    MessageUtil.toVersionPrefixedBytes(version,
+    
MessageUtil.toVersionPrefixedBytes(transactionVersionLevel.transactionLogValueVersion(),

Review Comment:
   I think the idea was that the upgrade path would be handled gracefully, but 
the downgrade path was not guaranteed to do so. Just to clarify though, this 
unsupported version should only show up if the image itself is downgraded, not 
the MV/TV alone. 
   
   That may be slightly different for downgrading from tv1 to tv0, but my 
understanding is that should also be only on image version downgrade. The 
record format downgrades are based on the semantics in 
https://cwiki.apache.org/confluence/display/KAFKA/KIP-915%3A+Txn+and+Group+Coordinator+Downgrade+Foundation.
 Can look into the case more specifically if we need. 



-- 
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]

Reply via email to