-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[cleanup] [broker] fix return value of TransactionTimeoutTrackerImpl#addTransaction #22020
[cleanup] [broker] fix return value of TransactionTimeoutTrackerImpl#addTransaction #22020
Conversation
Hi, @thetumbled Thanks for this catch. |
/pulsarbot rerun-failure-checks |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #22020 +/- ##
============================================
- Coverage 73.73% 73.66% -0.08%
+ Complexity 32536 32500 -36
============================================
Files 1863 1863
Lines 138816 138820 +4
Branches 15217 15219 +2
============================================
- Hits 102356 102257 -99
- Misses 28589 28667 +78
- Partials 7871 7896 +25
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This method has existed since 2.8. We can't change this without discussion. |
I agree. Even though this is a Beta interface, it has been around for too long. We can start a discussion. |
The discussion is at https://lists.apache.org/thread/hf3m2f0lxbksso761wbowcynotn45kbr |
...rc/main/java/org/apache/pulsar/broker/transaction/timeout/TransactionTimeoutTrackerImpl.java
Show resolved
Hide resolved
You changed the definition to |
Updated, thanks. |
Motivation
According to the method signature, we should return true when the transaction is added to the tracker.
But actually, we return false for any cases.
Update: Moreover, we do not use the return value anyway, it is useless. We have better remove it.
Modifications
Return true when the transaction is added to the tracker.Remove the return value as it is useless.
Verifying this change
(Please pick either of the following options)
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
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: thetumbled#41