Skip to content

[improve][txn][branch-2.11] Add getState in transaction for client API (#17423) - #19834

Merged
liangyepianzhou merged 1 commit into
branch-2.11from
getTxnState
Mar 16, 2023
Merged

[improve][txn][branch-2.11] Add getState in transaction for client API (#17423)#19834
liangyepianzhou merged 1 commit into
branch-2.11from
getTxnState

Conversation

@liangyepianzhou

Copy link
Copy Markdown
Contributor

Motivation

According to the comment #17423 (comment), we should cherry-pick #17423 to branch-2.11

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

now `org.apache.pulsar.client.api.transaction.Transaction` dont have a interface for user to get the transaction state.

user can get the transaction state to do user's own op.
1. add the interface in `org.apache.pulsar.client.api.transaction.Transaction`     `getState`
2. TransactionImpl implement the interface
```
     * Get transaction state.
     *
     * @return {@link State} the state of the transaction.
     */
    State getState();
```
add the test

(cherry picked from commit a9531db)
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Mar 16, 2023
@liangyepianzhou liangyepianzhou changed the title [improve][txn] Add getState in transaction for client API (#17423) [improve][txn][branch-2.11] Add getState in transaction for client API (#17423) Mar 16, 2023
@Technoboy- Technoboy- added this to the 3.0.0 milestone Mar 16, 2023
@liangyepianzhou
liangyepianzhou merged commit 1614e36 into branch-2.11 Mar 16, 2023
@codelipenghui
codelipenghui deleted the getTxnState branch April 4, 2023 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants