pulsar
pulsar copied to clipboard
[improve][txn] Allow transaction owners to abort their own transactions via the abortTransaction admin API
Motivation
PIP-325 (https://github.com/apache/pulsar/pull/21731) states that a transaction owner should be able to use the abortTransaction admin API to abort their own transactions, and that a super user can abort any transaction. However, the current implementation does not permit a transaction owner to access the abortTransaction admin API to abort their own transactions. This PR aims to resolve this issue.
Modifications
Allow transaction owners to abort their own transactions via the abortTransaction admin API
Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- Added test in
org.apache.pulsar.broker.admin.v3.AdminApiTransactionWithAuthTest#testAbortTransaction
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
- [x] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
Documentation
- [ ]
doc - [ ]
doc-required - [x]
doc-not-needed - [ ]
doc-complete
Matching PR in forked repository
PR in forked repository: https://github.com/hrzzzz/pulsar/pull/8