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

Replication factor determination ignores inactive hosts #195

Open
rprevot opened this issue Nov 28, 2017 · 0 comments
Open

Replication factor determination ignores inactive hosts #195

rprevot opened this issue Nov 28, 2017 · 0 comments
Assignees

Comments

@rprevot
Copy link
Contributor

rprevot commented Nov 28, 2017

Hi,

When using Token Aware load balancing, the replication factor is checked during startup.

This validation is done by the HostSelectionWithFallback class (initWithHosts and calculateReplicationFactor methods):

public void initWithHosts(Map<Host, HostConnectionPool<CL>> hPools) {
       List<HostToken> allHostTokens = tokenSupplier.getTokens(hPools.keySet());
       // ....
       if (localSelector.isTokenAware() && localRack != null) {
              replicationFactor.set(calculateReplicationFactor(allHostTokens));
       }
       // ...
}

Unfortunately, the given collection "hPools" contains only up hosts. So if one host is unavailable during startup, Dyno throws an exception even for symmetric configuration.

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

No branches or pull requests

2 participants