jolshan commented on code in PR #20882:
URL: https://github.com/apache/kafka/pull/20882#discussion_r2534898306
##########
storage/src/test/java/org/apache/kafka/storage/internals/log/ProducerStateManagerTest.java:
##########
@@ -267,11 +270,14 @@ public void testHasLateTransaction() {
assertTrue(stateManager.hasLateTransaction(time.milliseconds()));
// Finish the first transaction
- appendEndTxnMarker(stateManager, producerId1, epoch1,
ControlRecordType.COMMIT, 200);
+ // For TV2, we need to bump epoch; for TV0, same epoch is allowed.
(KIP-890, KIP-1228)
+ short markerEpoch1 = transactionVersion >= 2 ? (short) (epoch1 + 1) :
epoch1;
Review Comment:
Also should we make this logic a helper? Seems like its used in a lot of the
tests 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]