10000 Fix issue in probability calculus. · exploder86/java-driver@fe0d8b5 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe0d8b5

Browse files
author
Kevin Gallardo
committed
Fix issue in probability calculus.
1 parent 281436b commit fe0d8b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ protected Host computeNext() {
178178
Long hostTimestamp = newHostsEvents.getIfPresent(host);
179179
// should be evicted from the cache if present for more than the desired time
180180
if (hostTimestamp != null) {
181-
if (ignoreHostRandom.nextDouble() < (IGNORE_NEW_HOST_PROBA / 100)) {
181+
if (ignoreHostRandom.nextDouble() < (IGNORE_NEW_HOST_PROBA / 100.0)) {
182182
if (LOG.isTraceEnabled()) {
183183
LOG.trace(String.format("Host [%s] was chosen for query " +
184184
"but will be put at the end of the query plan as it is still in a warm-up phase", host));

0 commit comments

Comments
 (0)
0