jolshan commented on code in PR #23630:
URL: https://github.com/apache/kafka/pull/23630#discussion_r4147163039
##########
core/src/test/scala/unit/kafka/coordinator/transaction/TransactionStateManagerTest.scala:
##########
@@ -480,6 +518,23 @@ class TransactionStateManagerTest {
transactionManager.appendTransactionToLog(transactionalId1,
coordinatorEpoch = 10, failedMetadata, assertCallback, requestLocal =
RequestLocal.withThreadConfinedCaching)
}
+ @Test
+ def testAppendSucceededButLeadershipLostBeforeCallback(): Unit = {
+ transactionManager.addLoadedTransactionsToCache(partitionId,
coordinatorEpoch, new ConcurrentHashMap[String, TransactionMetadata]())
+ transactionManager.putTransactionStateIfNotExists(txnMetadata1)
+
+ // the write succeeds but the replica becomes a follower before the
callback runs
Review Comment:
I don't quite understand what this test is testing. Which callback is this?
--
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]