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

Fix DelegatingServiceInstanceListSupplier must #1226

Conversation

HJK181
Copy link
Contributor

@HJK181 HJK181 commented Apr 14, 2023

respect SelectedInstanceCallback on its delegate. Motivation behind is that some load balancer implementations like the RoundRobinLoadBalancer to call selectedServiceInstance on the ServiceInstanceListSupplier after choosing the next instance. However, when a ServiceInstanceListSupplier in wrapped by the DelegatingServiceInstanceListSupplier this functionality breaks, as DelegatingServiceInstanceListSupplier is not implementing SelectedInstanceCallback and therefore does ignoring that its delegate might also do. This might break the functionality of the delegate. Fixes gh-1221.

respect SelectedInstanceCallback on its delegate. Motivation behind is
that some load balancer implementations like the RoundRobinLoadBalancer
to call selectedServiceInstance on the ServiceInstanceListSupplier after
choosing the next instance. However, when a ServiceInstanceListSupplier
in wrapped by the DelegatingServiceInstanceListSupplier this
functionality breaks, as DelegatingServiceInstanceListSupplier is not
implementing SelectedInstanceCallback and therfore does ignoring that its
delegate might also do. This might break the functionality of the
delegate. Fixes spring-cloudgh-1221.
@HJK181
Copy link
Contributor Author

HJK181 commented May 24, 2023

@spencergibb @OlgaMaciaszek anybody?

@OlgaMaciaszek
Copy link
Collaborator

Thanks for providing the PR, @HJK181. Will take a look at it.

Copy link
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @HJK181, thanks for submitting the PR. It looks good, but there are some cosmetic changes that need to be made - please address the comments. Also, please update the forst line of the copyright clause on top of each changed file to -2023.

Copy link
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @HJK181 . Have added one more comment. Please take a look.

@HJK181 HJK181 force-pushed the selected-instance-callback-in-delagating-instance-supplier branch from d2ddb6a to 5b24a9b Compare May 31, 2023 04:51
Copy link
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HJK181. LGTM.

@OlgaMaciaszek OlgaMaciaszek merged commit f206883 into spring-cloud:main May 31, 2023
3 checks passed
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.

Make DelegatingServiceInstanceListSupplier implement SelectedInstanceCallback
3 participants