Elffuss BraidHub

kikocis/java-driver public

Actually set the scale in LatencyAwarePolicy.Builder#withScale

JAVA-275 #fixes
Changesetc3456ea3ec0fd8b7c486813cbe657938930f002be7c72cfe460975d293aa102a
AuthorSylvain Lebresne <sylvain@datastax.com> · 2014-02-26 16:15 +01:00
CommitterSylvain Lebresne <sylvain@datastax.com> · 2014-02-26 16:15 +01:00
Parents7be940daff25

Browse the files at this changeset

2 files changed

modified driver-core/CHANGELOG.rst +1 −0
@@ -16,6 +16,7 @@
1616 - [bug] Fix race when multiple connect are done in parallel (JAVA-261)
1717 - [bug] Don't connect at all to nodes that are ignored by the load balancing
1818 policy (JAVA-270)
19+- [bug] LatencyAwarePolicy.Builder#withScale doesn't set the scale (JAVA-275)
1920
2021
2122 1.0.5:
modified driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java +1 −0
@@ -572,6 +572,7 @@
572572 public Builder withScale(long scale, TimeUnit unit) {
573573 if (scale <= 0)
574574 throw new IllegalArgumentException("Invalid scale, must be strictly positive");
575+ this.scale = unit.toNanos(scale);
575576 return this;
576577 }
577578