lhotari commented on code in PR #25053:
URL: https://github.com/apache/pulsar/pull/25053#discussion_r2605598835
##########
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStore.java:
##########
@@ -423,6 +434,7 @@ public CompletableFuture<Void> updateTxnStatus(TxnID txnID,
TxnStatus newStatus,
abortedTransactionCount.increment();
}
txnMetaMap.remove(txnID.getLeastSigBits());
+ onGoingTxnCount.decrement();
Review Comment:
Are race conditions possible? just wondering if there should be a check that
the transaction really was removed once?
Something like this:
```java
if (txnMetaMap.remove(txnID.getLeastSigBits()) != null) {
onGoingTxnCount.decrement();
}
```
--
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]