congbobo184 opened a new pull request #10179:
URL: https://github.com/apache/pulsar/pull/10179


   ## Motivation
   Now recover don't handle transaction in committing or aborting status, it 
only add to ```transactionTimeOutTracker```. 
   
   ## implement
   Add ```TransactionRecoverTracker``` to handle different status transaction.
   
   ```
       /**
        * Handle recover transaction update status.
        * @param sequenceId {@link long} the sequenceId of this transaction.
        * @param txnStatus {@link long} the txn status of this operation.
        */
       void updateTransactionStatus(long sequenceId, TxnStatus txnStatus) 
throws CoordinatorException.InvalidTxnStatusException;
   
       /**
        * Handle recover transaction in open status.
        * @param sequenceId {@link Long} the sequenceId of this transaction.
        * @param timeout {@link long} the timeout time of this transaction.
        */
       void handleOpenStatusTransaction(long sequenceId, long timeout);
   
       /**
        * Handle the transaction in open status append to transaction timeout 
tracker.
        */
       void appendOpenTransactionToTimeoutTracker();
   
       /**
        * Handle the transaction in committing and aborting.
        */
       void handleCommittingAndAbortingTransaction();
   ```
   ### Verifying this change
   Add the tests for it
   
   Does this pull request potentially affect one of the following parts:
   If yes was chosen, please highlight the changes
   
   Dependencies (does it add or upgrade a dependency): (no)
   The public API: (no)
   The schema: (no)
   The default values of configurations: (no)
   The wire protocol: (no)
   The rest endpoints: (no)
   The admin cli options: (no)
   Anything that affects deployment: (no)
   
   


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

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


Reply via email to