-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DefaultServiceDiscoveryRetryStrategy
may emit duplicated SD events (#…
…1586) Motivation: When `DefaultServiceDiscoveryRetryStrategy` retains addresses till success and recovers from the previous SD error, it doesn't check which of new addresses were previously retained. As the result, it may propagate duplicated "available" events to `RoundRobinLoadBalancer`. RRLB does not support duplicated entries. It may lead to retaining duplicated addresses after they become unavailable, causing failures of requests. Modifications: - Filter out previously retained events when we recover from SD-error; - Do not return duplicated `unavailable` events on subsequent SD-errors; - Enhance tests to catch these use-cases; Result: `DefaultServiceDiscoveryRetryStrategyTest` does not emit duplicated SD events for the same availability state => RRLB does not retain duplicated entries.
- Loading branch information
1 parent
dc8972f
commit 5556e22
Showing
3 changed files
with
54 additions
and
20 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