artemlivshits commented on code in PR #20039:
URL: https://github.com/apache/kafka/pull/20039#discussion_r2220575422
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -1965,6 +1977,9 @@ private PendingStateTransition(
* @return a PreparedTxnState with the current producer ID and epoch
*/
public PreparedTxnState preparedTransactionState() {
- return this.preparedTxnState;
+ if (this.preparedTxnState == ProducerIdAndEpoch.NONE) {
Review Comment:
The point to use `ProducerIdAndEpoch` in `TransactionManager` is so that we
can return it to producer and use the package private constructor to create the
object, so that the string representation is encapsulated in the
`PreparedTxnState`.
--
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]