jolshan commented on code in PR #20882:
URL: https://github.com/apache/kafka/pull/20882#discussion_r2534890465
##########
storage/src/test/java/org/apache/kafka/storage/internals/log/ProducerStateManagerTest.java:
##########
@@ -214,7 +214,9 @@ public void testControlRecordBumpsProducerEpoch() {
appendClientEntry(stateManager, producerId, epoch, defaultSequence,
0L, false);
short bumpedProducerEpoch = 1;
- appendEndTxnMarker(stateManager, producerId, bumpedProducerEpoch,
ControlRecordType.ABORT, 1L);
+ // This test verifies state management after an epoch bump, not epoch
validation.
+ // Since we use a bumped epoch (1 > 0), it's valid for both TV0 and
TV2, so behavior is identical.
+ appendEndTxnMarker(stateManager, producerId, bumpedProducerEpoch,
ControlRecordType.ABORT, 1L, (short) 0);
Review Comment:
I might be confusing myself. But epoch bump is the one case in all TVs where
we do bump the epoch right? So should we have the stricter validation here? I
didn't quite understand the comment.
--
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]