poorbarcode commented on code in PR #19662:
URL: https://github.com/apache/pulsar/pull/19662#discussion_r1121926780
##########
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:
1. This is a great fix, but this patch doesn't solve all issues.
---
2. There already done this verification at
https://github.com/apache/pulsar/blob/7e0a6c48d23a3706182977c2e47eea211306ab5a/pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStore.java#L385-L388
---
3. And an additional issue: duplicate transaction logs are persisted.
https://github.com/apache/pulsar/blob/7e0a6c48d23a3706182977c2e47eea211306ab5a/pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStore.java#L398
---
The root cause: the in-flight persistent transaction log task is ignored
during the status check.
Can we make a mechanism to avoid this problem?
--
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]