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

feat: update HostSelector implementations to account for HostAvailablity #856

Merged

Conversation

aaronchung-bitquill
Copy link
Contributor

Summary

feat: update HostSelector implementations to account for HostAvailablity

Description

For each implementation of HostSelector, it filters and creates a list of eligible hosts. Added an extra condition to only filter out ones that are HostAvailability.NOT_AVAILABLE

Additional Reviewers

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -42,7 +43,8 @@ public HostSpec getHost(
@NonNull final HostRole role,
@Nullable final Properties props) throws SQLException {
final List<HostSpec> eligibleHosts = hosts.stream()
.filter(hostSpec -> role.equals(hostSpec.getRole()))
.filter(hostSpec ->
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: add a comment above this level explaining the filter clause

@aaronchung-bitquill aaronchung-bitquill force-pushed the feature/host-selector-availability branch 4 times, most recently from 8a4390d to c8f85c9 Compare January 30, 2024 01:41
@aaronchung-bitquill aaronchung-bitquill merged commit 2387494 into aws:main Jan 30, 2024
5 checks 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.

3 participants