KAFKA-19752: Move UnifiedLogTest to storage module#21844
KAFKA-19752: Move UnifiedLogTest to storage module#21844TaiJuWu wants to merge 8 commits intoapache:trunkfrom
Conversation
clolov
left a comment
There was a problem hiding this comment.
Thank you for this, made an initial pass
| LogTestUtils.appendEndTxnMarkerAsLeader(log, pid, epoch, ControlRecordType.ABORT, mockTime.milliseconds(), | ||
| 2, 1, TransactionVersion.TV_0.featureLevel()); |
There was a problem hiding this comment.
In Scala-world we invoke this code twice
LogTestUtils.appendEndTxnMarkerAsLeader(log, pid, epoch, ControlRecordType.ABORT, mockTime.milliseconds(),
coordinatorEpoch = 2, leaderEpoch = 1, transactionVersion = TransactionVersion.TV_0.featureLevel())
LogTestUtils.appendEndTxnMarkerAsLeader(log, pid, epoch, ControlRecordType.ABORT, mockTime.milliseconds(),
coordinatorEpoch = 2, leaderEpoch = 1, transactionVersion = TransactionVersion.TV_0.featureLevel())
assertThrows(classOf[TransactionCoordinatorFencedException],
() => LogTestUtils.appendEndTxnMarkerAsLeader(log, pid, epoch, ControlRecordType.ABORT, mockTime.milliseconds(),
coordinatorEpoch = 1, leaderEpoch = 1, transactionVersion = TransactionVersion.TV_0.featureLevel()))
Was this an oversight or it served some function?
There was a problem hiding this comment.
Miss this, thanks for catch it.
| } | ||
|
|
||
| @ParameterizedTest(name = "testEndTxnWithFencedProducerEpoch with transactionVersion={0}") | ||
| @ValueSource(shorts = {0, 1, 2}) |
There was a problem hiding this comment.
In Scala-world we only tested this with 1 and 2
@ParameterizedTest(name = "testEndTxnWithFencedProducerEpoch with transactionVersion={0}")
@ValueSource(shorts = Array(1, 2))
Is there a reason you decided to include 0 as well?
There was a problem hiding this comment.
from comment Test 1: Old epoch (epoch - 1) should be rejected for both TV0/TV1 and TV2 so I think it should include 0, we just miss it.
clolov
left a comment
There was a problem hiding this comment.
Looks good to me, thank you for the effort 😊!
| /** | ||
| * test renaming a log's dir without reinitialization, which is the case during topic deletion | ||
| */ |
There was a problem hiding this comment.
Is it possible for you to move the comment as well or get rid of it?
testTransactionIndexUpdatedThroughReplication ~
testRenamingDirWithoutReinitialization