jolshan commented on code in PR #20882:
URL: https://github.com/apache/kafka/pull/20882#discussion_r2535159755
##########
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:
Sorry I think I wasn't super clear here. What I mean is when we bump the
epoch for initProducerId/timing out a transaction, we still pull the TV from
the state even though we are bumping the epoch in all cases?
--
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]