Skip to content
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

Automatically expire ignored ServiceInstances #168

Merged
merged 4 commits into from Jan 28, 2022
Merged

Automatically expire ignored ServiceInstances #168

merged 4 commits into from Jan 28, 2022

Conversation

smcvb
Copy link
Member

@smcvb smcvb commented Jan 27, 2022

This pull request updates the IgnoreListingDiscoveryMode to evict ignored ServiceInstances after a configurable threshold.
To that end, whenever a ServiceInstance is ignored the time of ignoring plus the expireThreshold is stored with it.

To set the time of ignoring an instance, a public static Clock is added to the IgnoreListingDiscoveryMode.
Opening up the Clock provides users the freedom to change it, but also enables easier testing.

The IgnoreListingDiscoveryMode validates ignored ServiceInstance for eviction on any capabilities(ServiceInstance) invocation.
Doing so ensure the IgnoreListingDiscoveryMode moves in line with the heartbeats of the chosen Spring Cloud Discovery implementation.

This pull request resolves #6.

The IgnoreListingDiscoveryMode should let ignored ServiceInstances
expire after some time. This expiry time should be configurable to allow
 users to choose when to evict entries.

#6
Adjust coverage run approach

#6
@sonarcloud
Copy link

sonarcloud bot commented Jan 27, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Adjust coverage run approach for the pull request task

#6
Adjust the threshold from long to Duration

#6
@smcvb smcvb merged commit be471ab into master Jan 28, 2022
@smcvb smcvb deleted the feature/6 branch January 28, 2022 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The blackListedServiceInstances in SpringCloudCommandRouter should be reevaluated from time to time
3 participants