{{ message }}
Repository navigation
Conversation
Follow-up to apache#16516. The failure threshold is invokers.size() * broadcast.fail.percent / 100, so with four providers a percentage of 10 also gives a threshold of 0 and the broadcast has to stop at the first failed provider, as with a percentage of 0. Also fix the code comment that calls the parameter broadcast.fail.threshold; the key is broadcast.fail.percent.
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What is the purpose of the change?
Follow-up to #16516 (issue #16515), as suggested by @EarthChen in the review of #16516.
BroadCastClusterInvokerTest#testFailPercentRoundingDownToZero. The failure threshold isinvokers.size() * broadcast.fail.percent / 100, so with four providers andbroadcast.fail.percent=10it is 0, and the broadcast has to stop at the first failed provider, as with a percentage of 0. The test makes the second provider fail, so it also checks that the broadcast does not stop before the first failure, and asserts that the third and fourth providers are not called.BroadcastClusterInvokerthat calls the parameterbroadcast.fail.threshold. The key isbroadcast.fail.percent, and has been since it was added in fix the bug of broadcast cluster invoke #7174.No behavior change.
Verification
3.3. With the Stop broadcast at the first failure when broadcast.fail.percent is 0 #16516 change reverted, it fails atassertFalse(invoker3.isInvoked()).mvn test -pl dubbo-cluster: 308 tests, 0 failures (13 skipped, as on the base branch); spotless and checkstyle are clean.Checklist