thetumbled commented on code in PR #19662:
URL: https://github.com/apache/pulsar/pull/19662#discussion_r1122521829


##########
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStore.java:
##########
@@ -400,6 +400,10 @@ public CompletableFuture<Void> updateTxnStatus(TxnID 
txnID, TxnStatus newStatus,
                             appendLogCount.increment();
                             try {
                                 synchronized (txnMetaListPair.getLeft()) {
+                                    if (txnMetaListPair.getLeft().status() == 
newStatus) {

Review Comment:
   for 2:  Lines 385 to 388 can't avoid race condition, so i check the state 
status in synchronized block.
   for 3: this can be fixed easily, we just delete the duplicate transaction 
logs.
   ```
   transactionLog.deletePosition(Collections.singletonList(position));
   ```



-- 
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]

Reply via email to