Skip to content

Fix DelegatingServiceInstanceListSupplier must#1226

Merged
OlgaMaciaszek merged 3 commits intospring-cloud:mainfrom
HJK181:selected-instance-callback-in-delagating-instance-supplier
May 31, 2023
Merged

Fix DelegatingServiceInstanceListSupplier must#1226
OlgaMaciaszek merged 3 commits intospring-cloud:mainfrom
HJK181:selected-instance-callback-in-delagating-instance-supplier

Conversation

@HJK181
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

HJK181 commented May 24, 2023

@spencergibb @OlgaMaciaszek anybody?

@OlgaMaciaszek
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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