You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2017/02/03 20:21:12 UTC

[01/10] cassandra git commit: Fix speculative retry bugs

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 70e33d96e -> 25938090a
  refs/heads/cassandra-3.0 883c9f0f7 -> cc384a5d7
  refs/heads/cassandra-3.11 48cfe7d28 -> d8dfeb235
  refs/heads/trunk d0937cce9 -> d16944372


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-2.2
Commit: 25938090a68b10d12bf594fc344dd52fe5bd5447
Parents: 70e33d9
Author: Simon Zhou <sz...@uber.com>
Authored: Thu Feb 2 15:50:10 2017 -0500
Committer: T Jake Luciani <ja...@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


[02/10] cassandra git commit: Fix speculative retry bugs

Posted by ja...@apache.org.
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.0
Commit: 25938090a68b10d12bf594fc344dd52fe5bd5447
Parents: 70e33d9
Author: Simon Zhou <sz...@uber.com>
Authored: Thu Feb 2 15:50:10 2017 -0500
Committer: T Jake Luciani <ja...@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


[08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

Posted by ja...@apache.org.
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/cassandra-3.11
Commit: d8dfeb2354a35ac6987a13a72a6d2c20f5a2cb23
Parents: 48cfe7d cc384a5
Author: T Jake Luciani <ja...@apache.org>
Authored: Fri Feb 3 15:19:32 2017 -0500
Committer: T Jake Luciani <ja...@apache.org>
Committed: Fri Feb 3 15:19:32 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8dfeb23/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index be749aa,1d6b53c..d0134e5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -195,19 -86,6 +195,20 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
   * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * Fix speculative retry bugs (CASSANDRA-13009)
 + * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
 + * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856)
 + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979)
 + * Remove support for non-JavaScript UDFs (CASSANDRA-12883)
 + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074)
 + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909)
 + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616)
 + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796)
 + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980)
 + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935)
 + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
 + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
 + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)
   * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792)
   * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901)
   * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
@@@ -339,12 -208,6 +356,12 @@@ Merged from 2.2
   * Don't send erroneous NEW_NODE notifications on restart (CASSANDRA-11038)
   * StorageService shutdown hook should use a volatile variable (CASSANDRA-11984)
  Merged from 2.1:
 + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363)
-  * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) 
++ * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127)
 + * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828)
 + * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040)
 + * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)
 + * Fix filtering on clustering columns when 2i is used (CASSANDRA-11907)
   * Avoid stalling paxos when the paxos state expires (CASSANDRA-12043)
   * Remove finished incoming streaming connections from MessagingService (CASSANDRA-11854)
   * Don't try to get sstables for non-repairing column families (CASSANDRA-12077)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8dfeb23/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------


[05/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

Posted by ja...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.11
Commit: cc384a5d7959cc2be50be126303d7aa3377d2297
Parents: 883c9f0 2593809
Author: T Jake Luciani <ja...@apache.org>
Authored: Fri Feb 3 15:13:25 2017 -0500
Committer: T Jake Luciani <ja...@apache.org>
Committed: Fri Feb 3 15:13:25 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc384a5d/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index dc10e1f,086e0e5..1d6b53c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,38 -1,6 +1,39 @@@
 -2.2.9
 +3.0.11
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace (CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables (CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair (CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted (CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message (CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME (CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown (CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log records (CASSANDRA-12956)
 + * Reject default_time_to_live option when creating or altering MVs (CASSANDRA-12868)
 + * Nodetool should use a more sane max heap size (CASSANDRA-12739)
 + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
 + * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934)
 + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535)
 + * Reenable HeapPool (CASSANDRA-12900)
 +Merged from 2.2:
-  * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981) 
+  * Fix speculative retry bugs (CASSANDRA-13009)
 - * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981) 
++ * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
 + * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856)
 + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979)
   * Remove support for non-JavaScript UDFs (CASSANDRA-12883)
   * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074)
   * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909)
@@@ -183,10 -62,12 +184,10 @@@ Merged from 2.2
   * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214)
   * Synchronize ThriftServer::stop() (CASSANDRA-12105)
   * Use dedicated thread for JMX notifications (CASSANDRA-12146)
 - * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143)
   * Improve streaming synchronization and fault tolerance (CASSANDRA-11414)
   * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973)
 - * Don't write shadowed range tombstone (CASSANDRA-12030)
  Merged from 2.1:
-  * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) 
 - * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363)
++ * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127)
   * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828)
   * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040)
   * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc384a5d/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 39ed804,2e52eb2..e82f1d3
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -375,16 -375,16 +375,16 @@@ public class ColumnFamilyStore implemen
          assert metadata != null : "null metadata for " + keyspace + ":" + columnFamilyName;
  
          this.keyspace = keyspace;
 -        name = columnFamilyName;
          this.metadata = metadata;
 -        this.minCompactionThreshold = new DefaultInteger(metadata.getMinCompactionThreshold());
 -        this.maxCompactionThreshold = new DefaultInteger(metadata.getMaxCompactionThreshold());
 -        this.partitioner = partitioner;
 -        this.directories = directories;
 -        this.indexManager = new SecondaryIndexManager(this);
 -        this.metric = new ColumnFamilyMetrics(this);
 +        name = columnFamilyName;
 +        minCompactionThreshold = new DefaultValue<>(metadata.params.compaction.minCompactionThreshold());
 +        maxCompactionThreshold = new DefaultValue<>(metadata.params.compaction.maxCompactionThreshold());
 +        crcCheckChance = new DefaultValue<>(metadata.params.crcCheckChance);
 +        indexManager = new SecondaryIndexManager(this);
 +        viewManager = keyspace.viewManager.forTable(metadata);
 +        metric = new TableMetrics(this);
          fileIndexGenerator.set(generation);
-         sampleLatencyNanos = DatabaseDescriptor.getReadRpcTimeout() / 2;
+         sampleLatencyNanos = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getReadRpcTimeout() / 2);
  
          logger.info("Initializing {}.{}", keyspace.getName(), name);
  
@@@ -448,10 -443,11 +448,10 @@@
                      {
                          case PERCENTILE:
                              // get percentile in nanos
-                             sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.threshold()) * 1000d);
 -                            sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.value));
++                            sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.threshold()));
                              break;
                          case CUSTOM:
 -                            // convert to nanos, since configuration is in millisecond
 -                            sampleLatencyNanos = (long) (retryPolicy.value * 1000d * 1000d);
 +                            sampleLatencyNanos = (long) retryPolicy.threshold();
                              break;
                          default:
                              sampleLatencyNanos = Long.MAX_VALUE;


[03/10] cassandra git commit: Fix speculative retry bugs

Posted by ja...@apache.org.
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 <sz...@uber.com>
Authored: Thu Feb 2 15:50:10 2017 -0500
Committer: T Jake Luciani <ja...@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


[07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

Posted by ja...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: cc384a5d7959cc2be50be126303d7aa3377d2297
Parents: 883c9f0 2593809
Author: T Jake Luciani <ja...@apache.org>
Authored: Fri Feb 3 15:13:25 2017 -0500
Committer: T Jake Luciani <ja...@apache.org>
Committed: Fri Feb 3 15:13:25 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc384a5d/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index dc10e1f,086e0e5..1d6b53c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,38 -1,6 +1,39 @@@
 -2.2.9
 +3.0.11
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace (CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables (CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair (CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted (CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message (CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME (CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown (CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log records (CASSANDRA-12956)
 + * Reject default_time_to_live option when creating or altering MVs (CASSANDRA-12868)
 + * Nodetool should use a more sane max heap size (CASSANDRA-12739)
 + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
 + * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934)
 + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535)
 + * Reenable HeapPool (CASSANDRA-12900)
 +Merged from 2.2:
-  * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981) 
+  * Fix speculative retry bugs (CASSANDRA-13009)
 - * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981) 
++ * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
 + * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856)
 + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979)
   * Remove support for non-JavaScript UDFs (CASSANDRA-12883)
   * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074)
   * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909)
@@@ -183,10 -62,12 +184,10 @@@ Merged from 2.2
   * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214)
   * Synchronize ThriftServer::stop() (CASSANDRA-12105)
   * Use dedicated thread for JMX notifications (CASSANDRA-12146)
 - * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143)
   * Improve streaming synchronization and fault tolerance (CASSANDRA-11414)
   * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973)
 - * Don't write shadowed range tombstone (CASSANDRA-12030)
  Merged from 2.1:
-  * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) 
 - * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363)
++ * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127)
   * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828)
   * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040)
   * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc384a5d/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 39ed804,2e52eb2..e82f1d3
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -375,16 -375,16 +375,16 @@@ public class ColumnFamilyStore implemen
          assert metadata != null : "null metadata for " + keyspace + ":" + columnFamilyName;
  
          this.keyspace = keyspace;
 -        name = columnFamilyName;
          this.metadata = metadata;
 -        this.minCompactionThreshold = new DefaultInteger(metadata.getMinCompactionThreshold());
 -        this.maxCompactionThreshold = new DefaultInteger(metadata.getMaxCompactionThreshold());
 -        this.partitioner = partitioner;
 -        this.directories = directories;
 -        this.indexManager = new SecondaryIndexManager(this);
 -        this.metric = new ColumnFamilyMetrics(this);
 +        name = columnFamilyName;
 +        minCompactionThreshold = new DefaultValue<>(metadata.params.compaction.minCompactionThreshold());
 +        maxCompactionThreshold = new DefaultValue<>(metadata.params.compaction.maxCompactionThreshold());
 +        crcCheckChance = new DefaultValue<>(metadata.params.crcCheckChance);
 +        indexManager = new SecondaryIndexManager(this);
 +        viewManager = keyspace.viewManager.forTable(metadata);
 +        metric = new TableMetrics(this);
          fileIndexGenerator.set(generation);
-         sampleLatencyNanos = DatabaseDescriptor.getReadRpcTimeout() / 2;
+         sampleLatencyNanos = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getReadRpcTimeout() / 2);
  
          logger.info("Initializing {}.{}", keyspace.getName(), name);
  
@@@ -448,10 -443,11 +448,10 @@@
                      {
                          case PERCENTILE:
                              // get percentile in nanos
-                             sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.threshold()) * 1000d);
 -                            sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.value));
++                            sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.threshold()));
                              break;
                          case CUSTOM:
 -                            // convert to nanos, since configuration is in millisecond
 -                            sampleLatencyNanos = (long) (retryPolicy.value * 1000d * 1000d);
 +                            sampleLatencyNanos = (long) retryPolicy.threshold();
                              break;
                          default:
                              sampleLatencyNanos = Long.MAX_VALUE;


[06/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

Posted by ja...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: cc384a5d7959cc2be50be126303d7aa3377d2297
Parents: 883c9f0 2593809
Author: T Jake Luciani <ja...@apache.org>
Authored: Fri Feb 3 15:13:25 2017 -0500
Committer: T Jake Luciani <ja...@apache.org>
Committed: Fri Feb 3 15:13:25 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc384a5d/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index dc10e1f,086e0e5..1d6b53c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,38 -1,6 +1,39 @@@
 -2.2.9
 +3.0.11
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
 + * Dump threads when unit tests time out (CASSANDRA-13117)
 + * Better error when modifying function permissions without explicit keyspace (CASSANDRA-12925)
 + * Indexer is not correctly invoked when building indexes over sstables (CASSANDRA-13075)
 + * Read repair is not blocking repair to finish in foreground repair (CASSANDRA-13115)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
 + * Remove ALTER TYPE support (CASSANDRA-12443)
 + * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Replace empty strings with null values if they cannot be converted (CASSANDRA-12794)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348)
 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
 + * Add parent repair session id to anticompaction log message (CASSANDRA-12186)
 + * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905)
 + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
 + * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
 + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME (CASSANDRA-13040)
 + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
 + * Thread local pools never cleaned up (CASSANDRA-13033)
 + * Set RPC_READY to false when draining or if a node is marked as shutdown (CASSANDRA-12781)
 + * Make sure sstables only get committed when it's safe to discard commit log records (CASSANDRA-12956)
 + * Reject default_time_to_live option when creating or altering MVs (CASSANDRA-12868)
 + * Nodetool should use a more sane max heap size (CASSANDRA-12739)
 + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
 + * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934)
 + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535)
 + * Reenable HeapPool (CASSANDRA-12900)
 +Merged from 2.2:
-  * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981) 
+  * Fix speculative retry bugs (CASSANDRA-13009)
 - * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981) 
++ * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
 + * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856)
 + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979)
   * Remove support for non-JavaScript UDFs (CASSANDRA-12883)
   * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074)
   * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909)
@@@ -183,10 -62,12 +184,10 @@@ Merged from 2.2
   * Fixed cqlshlib.test.remove_test_db (CASSANDRA-12214)
   * Synchronize ThriftServer::stop() (CASSANDRA-12105)
   * Use dedicated thread for JMX notifications (CASSANDRA-12146)
 - * NPE when trying to remove purgable tombstones from result (CASSANDRA-12143)
   * Improve streaming synchronization and fault tolerance (CASSANDRA-11414)
   * MemoryUtil.getShort() should return an unsigned short also for architectures not supporting unaligned memory accesses (CASSANDRA-11973)
 - * Don't write shadowed range tombstone (CASSANDRA-12030)
  Merged from 2.1:
-  * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) 
 - * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363)
++ * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127)
   * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828)
   * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040)
   * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc384a5d/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 39ed804,2e52eb2..e82f1d3
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -375,16 -375,16 +375,16 @@@ public class ColumnFamilyStore implemen
          assert metadata != null : "null metadata for " + keyspace + ":" + columnFamilyName;
  
          this.keyspace = keyspace;
 -        name = columnFamilyName;
          this.metadata = metadata;
 -        this.minCompactionThreshold = new DefaultInteger(metadata.getMinCompactionThreshold());
 -        this.maxCompactionThreshold = new DefaultInteger(metadata.getMaxCompactionThreshold());
 -        this.partitioner = partitioner;
 -        this.directories = directories;
 -        this.indexManager = new SecondaryIndexManager(this);
 -        this.metric = new ColumnFamilyMetrics(this);
 +        name = columnFamilyName;
 +        minCompactionThreshold = new DefaultValue<>(metadata.params.compaction.minCompactionThreshold());
 +        maxCompactionThreshold = new DefaultValue<>(metadata.params.compaction.maxCompactionThreshold());
 +        crcCheckChance = new DefaultValue<>(metadata.params.crcCheckChance);
 +        indexManager = new SecondaryIndexManager(this);
 +        viewManager = keyspace.viewManager.forTable(metadata);
 +        metric = new TableMetrics(this);
          fileIndexGenerator.set(generation);
-         sampleLatencyNanos = DatabaseDescriptor.getReadRpcTimeout() / 2;
+         sampleLatencyNanos = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getReadRpcTimeout() / 2);
  
          logger.info("Initializing {}.{}", keyspace.getName(), name);
  
@@@ -448,10 -443,11 +448,10 @@@
                      {
                          case PERCENTILE:
                              // get percentile in nanos
-                             sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.threshold()) * 1000d);
 -                            sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.value));
++                            sampleLatencyNanos = (long) (metric.coordinatorReadLatency.getSnapshot().getValue(retryPolicy.threshold()));
                              break;
                          case CUSTOM:
 -                            // convert to nanos, since configuration is in millisecond
 -                            sampleLatencyNanos = (long) (retryPolicy.value * 1000d * 1000d);
 +                            sampleLatencyNanos = (long) retryPolicy.threshold();
                              break;
                          default:
                              sampleLatencyNanos = Long.MAX_VALUE;


[09/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

Posted by ja...@apache.org.
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: d8dfeb2354a35ac6987a13a72a6d2c20f5a2cb23
Parents: 48cfe7d cc384a5
Author: T Jake Luciani <ja...@apache.org>
Authored: Fri Feb 3 15:19:32 2017 -0500
Committer: T Jake Luciani <ja...@apache.org>
Committed: Fri Feb 3 15:19:32 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8dfeb23/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index be749aa,1d6b53c..d0134e5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -195,19 -86,6 +195,20 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
   * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
++ * Fix speculative retry bugs (CASSANDRA-13009)
 + * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
 + * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856)
 + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979)
 + * Remove support for non-JavaScript UDFs (CASSANDRA-12883)
 + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074)
 + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909)
 + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616)
 + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796)
 + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980)
 + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935)
 + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914)
 + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899)
 + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281)
   * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792)
   * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901)
   * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863)
@@@ -339,12 -208,6 +356,12 @@@ Merged from 2.2
   * Don't send erroneous NEW_NODE notifications on restart (CASSANDRA-11038)
   * StorageService shutdown hook should use a volatile variable (CASSANDRA-11984)
  Merged from 2.1:
 + * Add system property to set the max number of native transport requests in queue (CASSANDRA-11363)
-  * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127) 
++ * Fix queries with empty ByteBuffer values in clustering column restrictions (CASSANDRA-12127)
 + * Disable passing control to post-flush after flush failure to prevent data loss (CASSANDRA-11828)
 + * Allow STCS-in-L0 compactions to reduce scope with LCS (CASSANDRA-12040)
 + * cannot use cql since upgrading python to 2.7.11+ (CASSANDRA-11850)
 + * Fix filtering on clustering columns when 2i is used (CASSANDRA-11907)
   * Avoid stalling paxos when the paxos state expires (CASSANDRA-12043)
   * Remove finished incoming streaming connections from MessagingService (CASSANDRA-11854)
   * Don't try to get sstables for non-repairing column families (CASSANDRA-12077)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8dfeb23/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------


[10/10] cassandra git commit: Merge branch 'cassandra-3.11' into trunk

Posted by ja...@apache.org.
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: d16944372c5d929bf3e1434f0e2e4d33e2cd9d07
Parents: d0937cc d8dfeb2
Author: T Jake Luciani <ja...@apache.org>
Authored: Fri Feb 3 15:20:26 2017 -0500
Committer: T Jake Luciani <ja...@apache.org>
Committed: Fri Feb 3 15:20:26 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d1694437/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 90392b8,d0134e5..2076c8f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -226,9 -195,11 +226,10 @@@ Merged from 3.0
   * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776)
   * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545)
  Merged from 2.2:
-  * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981) 
+  * Fix speculative retry bugs (CASSANDRA-13009)
+  * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
   * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856)
   * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979)
 - * Remove support for non-JavaScript UDFs (CASSANDRA-12883)
   * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074)
   * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909)
   * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d1694437/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 4aa2d3e,1ff956e..039dc33
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -407,14 -394,14 +407,14 @@@ public class ColumnFamilyStore implemen
          this.keyspace = keyspace;
          this.metadata = metadata;
          name = columnFamilyName;
 -        minCompactionThreshold = new DefaultValue<>(metadata.params.compaction.minCompactionThreshold());
 -        maxCompactionThreshold = new DefaultValue<>(metadata.params.compaction.maxCompactionThreshold());
 -        crcCheckChance = new DefaultValue<>(metadata.params.crcCheckChance);
 +        minCompactionThreshold = new DefaultValue<>(metadata.get().params.compaction.minCompactionThreshold());
 +        maxCompactionThreshold = new DefaultValue<>(metadata.get().params.compaction.maxCompactionThreshold());
 +        crcCheckChance = new DefaultValue<>(metadata.get().params.crcCheckChance);
          indexManager = new SecondaryIndexManager(this);
 -        viewManager = keyspace.viewManager.forTable(metadata);
 +        viewManager = keyspace.viewManager.forTable(metadata.id);
          metric = new TableMetrics(this);
          fileIndexGenerator.set(generation);
-         sampleLatencyNanos = DatabaseDescriptor.getReadRpcTimeout() / 2;
+         sampleLatencyNanos = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getReadRpcTimeout() / 2);
  
          logger.info("Initializing {}.{}", keyspace.getName(), name);
  


[04/10] cassandra git commit: Fix speculative retry bugs

Posted by ja...@apache.org.
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/trunk
Commit: 25938090a68b10d12bf594fc344dd52fe5bd5447
Parents: 70e33d9
Author: Simon Zhou <sz...@uber.com>
Authored: Thu Feb 2 15:50:10 2017 -0500
Committer: T Jake Luciani <ja...@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