cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [03/10] cassandra git commit: Fix speculative retry bugs
Date Fri, 03 Feb 2017 20:21:14 GMT
Fix speculative retry bugs

Patch by Simon Zhou; reviewed by tjake for CASSANDRA-13009


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/25938090
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/25938090
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/25938090

Branch: refs/heads/cassandra-3.11
Commit: 25938090a68b10d12bf594fc344dd52fe5bd5447
Parents: 70e33d9
Author: Simon Zhou <szhou@uber.com>
Authored: Thu Feb 2 15:50:10 2017 -0500
Committer: T Jake Luciani <jake@apache.org>
Committed: Fri Feb 3 15:11:44 2017 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             | 1 +
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/25938090/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c5e5335..086e0e5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Fix speculative retry bugs (CASSANDRA-13009)
  * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981) 
  * Remove support for non-JavaScript UDFs (CASSANDRA-12883)
  * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/25938090/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 4bc46d0..2e52eb2 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -384,7 +384,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
         this.indexManager = new SecondaryIndexManager(this);
         this.metric = new ColumnFamilyMetrics(this);
         fileIndexGenerator.set(generation);
-        sampleLatencyNanos = DatabaseDescriptor.getReadRpcTimeout() / 2;
+        sampleLatencyNanos = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getReadRpcTimeout()
/ 2);
 
         logger.info("Initializing {}.{}", keyspace.getName(), name);
 
@@ -443,7 +443,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
                     {
                         case PERCENTILE:
                             // get percentile in nanos
-                            sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.value)
* 1000d);
+                            sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.value));
                             break;
                         case CUSTOM:
                             // convert to nanos, since configuration is in millisecond


Mime
View raw message