[cleanup][txn] Avoid unnessary method call if txn disabled.
Fixes #18324
Motivation
avoid unnecessary method call if txn disabled.
Modifications
- remove
isTxnEnabledparameter inTransactionBuffer.checkIfTransactionBufferRecoverCompletely. - check isTxnEnabled before call txn related code in common code path.
- remove unused constructor of
PersistentTopic
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
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
- [ ] Anything that affects deployment
Documentation
- [ ]
doc - [ ]
doc-required - [x]
doc-not-needed - [ ]
doc-complete
@WJL3333 Please add the following content to your PR description and select a checkbox:
- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
@codelipenghui @congbobo184 please take a look, thank you~
@congbobo184 Could you take a look?
The pr had no activity for 30 days, mark with Stale label.
Closed as stale. Also, code can be written in multiple styles. Such changes without a clear style rule are not converged. Generally, who write the functionality or fix a bug make the call on the style of his/her code snippet.