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

Boundary for ServiceAddition and ServiceFinderHubRefresh #40

Merged
merged 8 commits into from
Aug 20, 2024

Conversation

koushikr
Copy link
Collaborator

@koushikr koushikr commented Jul 9, 2024

This is pertaining to the dynamic service addition PR

What?

Dynamic Finder Construction via CompletableFuture (..) requires every client that interacts with ranger to implement the boundary within, and also solves only a part of the problem. The other half is, hubRefresh also needs to be similarly bounded.

Why?

If the clients don't handle the timeout on creation of a serviceFinder, by specifying a timeout on CompletableFuture provided - there is a risk that they will run into an infinite loop, since finder refresh will wait eternally. Same with the hub. In cases where the node_data_sources are unreachable or latent, this may manifest. This boundary condition exits that infinite loop. (This when a nodeDataSource is unreachable)

If the upstream a service is calling is down, it has no impact on the service coming up - it is not to be confused with that. The service will still come up with empty nodes for the stream. Please check the implementations of node_data_source refresh for both zk and http for the same.

How?

Introduced hubStartDurationMs and finderRefreshDurationMs for defining the boundary, in the hubBuilder. If this boundary were to breach, throw with an IllegalStateException.

Added tests, upgraded versions and updated CHANGELOG.

Also, this PR may not be required anymore.

koushikr added 4 commits July 9, 2024 11:55
…ertaining to appform-io#22

b) Introduced hubStartDurationMs and finderRefreshDurationMs for defining the boundary. If this boundary were to breach, throw with an IllegalStateException
c) Added tests, upgraded versions and added CHANGELOG
@koushikr koushikr changed the title Draft : Boundary for ServiceAddition and ServiceFinderHubRefresh Boundary for ServiceAddition and ServiceFinderHubRefresh Jul 19, 2024
@santanusinha santanusinha merged commit 493f0b4 into appform-io:main Aug 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants