Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Transaction] Tc recover handle transaction in committing and aborting status . #10179

Merged

Conversation

congbobo184
Copy link
Contributor

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)

@codelipenghui
Copy link
Contributor

/pulsarbot run-failure-checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants