jolshan commented on code in PR #14489:
URL: https://github.com/apache/kafka/pull/14489#discussion_r1346606122


##########
core/src/main/scala/kafka/coordinator/transaction/TransactionMetadata.scala:
##########
@@ -375,7 +375,7 @@ private[transaction] class TransactionMetadata(val 
transactionalId: String,
                                   newTopicPartitions: 
immutable.Set[TopicPartition],
                                   newTxnStartTimestamp: Long,
                                   updateTimestamp: Long): TxnTransitMetadata = 
{
-    if (pendingState.isDefined)
+    if (pendingState.isDefined && pendingState.get != newState)

Review Comment:
   Without this change we fail to update since we mark pending state 
CompleteCommit/Abort multiple times. I need to see if there is any problem with 
this change. For this specific case, I think it is fine because we are pending 
the same state.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to