You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/06 16:22:15 UTC

[GitHub] [pulsar] poorbarcode commented on a diff in pull request #15472: [Fix][txn] Make transaction stats consistent at end txn

poorbarcode commented on code in PR #15472:
URL: https://github.com/apache/pulsar/pull/15472#discussion_r866984589


##########
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStore.java:
##########
@@ -374,8 +374,8 @@ public CompletableFuture<Void> updateTxnStatus(TxnID txnID, TxnStatus newStatus,
                                 if (newStatus == TxnStatus.COMMITTED || newStatus == TxnStatus.ABORTED) {
                                     transactionLog.deletePosition(txnMetaListPair.getRight()).whenComplete((v, ex) -> {
                                         if (ex != null) {
-                                            promise.completeExceptionally(ex);
-                                            return;
+                                            log.warn("Failed to delete transaction log position "
+                                                    + "at end transaction [{}]", txnID);

Review Comment:
   When broker restart, in `MLTransactionMetadataStore` init method,  cursor will be checked again. But if cursor does not work for a long time, it will cause broker restart difficulties.
   
   https://github.com/apache/pulsar/blob/ac6bd3c71e24b90826438cd44395ca21a849067f/pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStore.java#L161-L176



-- 
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: commits-unsubscribe@pulsar.apache.org

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