forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cleanup] [broker] fix return value of TransactionTimeoutTrackerImpl#…
…addTransaction (apache#22020) ### Motivation According to the method signature, we should return true when the transaction is added to the tracker. ``` /** * Add a txnID to the tracker. * * @param sequenceId * the sequenceId * @param timeout * the absolute timestamp for transaction timeout * * @return true if the transaction was added to the tracker or false if had timed out */ CompletableFuture<Boolean> addTransaction(long sequenceId, long timeout); ``` 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.
- Loading branch information
1 parent
5df97b4
commit 0dabc97
Showing
3 changed files
with
4 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters