Skip to content

Commit 4618b63

Browse files
committed
add log for keepPrepared
1 parent 5ccb444 commit 4618b63

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java

+3
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ synchronized TransactionalRequestResult initializeTransactions(
307307
if (!isEpochBump) {
308308
transitionTo(State.INITIALIZING);
309309
log.info("Invoking InitProducerId for the first time in order to acquire a producer ID");
310+
if (keepPreparedTxn) {
311+
log.info("Invoking InitProducerId with keepPreparedTxn set to true for 2PC transactions");
312+
}
310313
} else {
311314
log.info("Invoking InitProducerId with current producer ID and epoch {} in order to bump the epoch", producerIdAndEpoch);
312315
}

0 commit comments

Comments
 (0)