rreddy-22 commented on code in PR #23831:
URL: https://github.com/apache/kafka/pull/23831#discussion_r4298977660


##########
core/src/test/scala/unit/kafka/coordinator/transaction/TransactionStateManagerTest.scala:
##########
@@ -735,6 +735,40 @@ class TransactionStateManagerTest {
     verifyWritesTxnMarkersInPrepareState(TransactionState.PREPARE_ABORT)
   }
 
+  @Test
+  def shouldCompleteEmptyPrepareCommitOnLoad(): Unit = {
+    // With transaction V2, committing a transaction with no partitions writes 
PrepareCommit with no partitions.
+    // On load, it must be completed the same way as an empty PrepareAbort.

Review Comment:
   good point I just added one. This test lets a TV2 commit of an empty 
transaction write a PrepareCommit with no partitions, the same way TV2 already 
writes an empty PrepareAbort. The test checks that such a record is still 
completed when the partition is loaded.



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