Merge branch 'cassandra-3.0' into cassandra-3.X

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

Branch: refs/heads/trunk
Commit: 2931a1938db4de877f2e1e3c2916e0f308dafa3e
Parents: a041908 7a274dd
Author: Marcus Eriksson <marc...@apache.org>
Authored: Thu Oct 13 15:08:58 2016 +0200
Committer: Marcus Eriksson <marc...@apache.org>
Committed: Thu Oct 13 15:08:58 2016 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 ++++-
 .../cassandra/db/ColumnFamilyMetricTest.java    | 29 ++++++++++++++++++++
 3 files changed, 36 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2931a193/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index f0df0e6,dc7bcab..c0b1b20
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -109,61 -45,12 +109,62 @@@ Merged from 3.0
   * Disk failure policy should not be invoked on out of space (CASSANDRA-12385)
   * Calculate last compacted key on startup (CASSANDRA-6216)
   * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
++ * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-11117)
 + * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
 + * Fix merkle tree depth calculation (CASSANDRA-12580)
 + * Make Collections deserialization more robust (CASSANDRA-12618)
 + * Better handle invalid system roles table (CASSANDRA-12700)
 + * Fix exceptions when enabling gossip on nodes that haven't joined the ring 
(CASSANDRA-12253)
 + * Fix authentication problem when invoking cqlsh copy from a SOURCE command 
(CASSANDRA-12642)
 + * Decrement pending range calculator jobs counter in finally block
 + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481)
 + * Forward writes to replacement node when replace_address != 
broadcast_address (CASSANDRA-8523)
 + * Fail repair on non-existing table (CASSANDRA-12279)
 + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) 
(CASSANDRA-12522)
 +
 +
 +3.8, 3.9
 + * Fix value skipping with counter columns (CASSANDRA-11726)
 + * Fix nodetool tablestats miss SSTable count (CASSANDRA-12205)
 + * Fixed flacky SSTablesIteratedTest (CASSANDRA-12282)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * cqlsh: Fix handling of $$-escaped strings (CASSANDRA-12189)
 + * Fix SSL JMX requiring truststore containing server cert (CASSANDRA-12109)
 + * RTE from new CDC column breaks in flight queries (CASSANDRA-12236)
 + * Fix hdr logging for single operation workloads (CASSANDRA-12145)
 + * Fix SASI PREFIX search in CONTAINS mode with partial terms 
(CASSANDRA-12073)
 + * Increase size of flushExecutor thread pool (CASSANDRA-12071)
 + * Partial revert of CASSANDRA-11971, cannot recycle buffer in 
SP.sendMessagesToNonlocalDC (CASSANDRA-11950)
 + * Upgrade netty to 4.0.39 (CASSANDRA-12032, CASSANDRA-12034)
 + * Improve details in compaction log message (CASSANDRA-12080)
 + * Allow unset values in CQLSSTableWriter (CASSANDRA-11911)
 + * Chunk cache to request compressor-compatible buffers if pool space is 
exhausted (CASSANDRA-11993)
 + * Remove DatabaseDescriptor dependencies from SequentialWriter 
(CASSANDRA-11579)
 + * Move skip_stop_words filter before stemming (CASSANDRA-12078)
 + * Support seek() in EncryptedFileSegmentInputStream (CASSANDRA-11957)
 + * SSTable tools mishandling LocalPartitioner (CASSANDRA-12002)
 + * When SEPWorker assigned work, set thread name to match pool 
(CASSANDRA-11966)
 + * Add cross-DC latency metrics (CASSANDRA-11596)
 + * Allow terms in selection clause (CASSANDRA-10783)
 + * Add bind variables to trace (CASSANDRA-11719)
 + * Switch counter shards' clock to timestamps (CASSANDRA-9811)
 + * Introduce HdrHistogram and response/service/wait separation to stress tool 
(CASSANDRA-11853)
 + * entry-weighers in QueryProcessor should respect partitionKeyBindIndexes 
field (CASSANDRA-11718)
 + * Support older ant versions (CASSANDRA-11807)
 + * Estimate compressed on disk size when deciding if sstable size limit 
reached (CASSANDRA-11623)
 + * cassandra-stress profiles should support case sensitive schemas 
(CASSANDRA-11546)
 + * Remove DatabaseDescriptor dependency from FileUtils (CASSANDRA-11578)
 + * Faster streaming (CASSANDRA-9766)
 + * Add prepared query parameter to trace for "Execute CQL3 prepared query" 
session (CASSANDRA-11425)
 + * Add repaired percentage metric (CASSANDRA-11503)
 + * Add Change-Data-Capture (CASSANDRA-8844)
 +Merged from 3.0:
 + * Fix paging for 2.x to 3.x upgrades (CASSANDRA-11195)
   * Fix clean interval not sent to commit log for empty memtable flush 
(CASSANDRA-12436)
   * Fix potential resource leak in RMIServerSocketFactoryImpl (CASSANDRA-12331)
 - * Backport CASSANDRA-12002 (CASSANDRA-12177)
   * Make sure compaction stats are updated when compaction is interrupted 
(CASSANDRA-12100)
 - * Fix potential bad messaging service message for paged range reads
 -   within mixed-version 3.x clusters (CASSANDRA-12249)
   * Change commitlog and sstables to track dirty and clean intervals 
(CASSANDRA-11828)
   * NullPointerException during compaction on table with static columns 
(CASSANDRA-12336)
   * Fixed ConcurrentModificationException when reading metrics in 
GraphiteReporter (CASSANDRA-11823)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2931a193/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 94d71ff,adfd1af..f89ac3f
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -1313,17 -1183,21 +1313,22 @@@ public class ColumnFamilyStore implemen
  
      {
          long start = System.nanoTime();
 -        Memtable mt = data.getMemtableFor(opGroup, replayPosition);
          try
          {
 +            Memtable mt = data.getMemtableFor(opGroup, commitLogPosition);
              long timeDelta = mt.put(update, indexer, opGroup);
              DecoratedKey key = update.partitionKey();
 -            maybeUpdateRowCache(key);
 +            invalidateCachedPartition(key);
              metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
 +            StorageHook.instance.reportWrite(metadata.cfId, update);
              metric.writeLatency.addNano(System.nanoTime() - start);
+             // CASSANDRA-11117 - certain resolution paths on memtable put can 
result in very
+             // large time deltas, either through a variety of sentinel 
timestamps (used for empty values, ensuring
+             // a minimal write, etc). This limits the time delta to the max 
value the histogram
+             // can bucket correctly. This also filters the Long.MAX_VALUE 
case where there was no previous value
+             // to update.
              if(timeDelta < Long.MAX_VALUE)
-                 metric.colUpdateTimeDeltaHistogram.update(timeDelta);
+                 
metric.colUpdateTimeDeltaHistogram.update(Math.min(18165375903306L, timeDelta));
          }
          catch (RuntimeException e)
          {

Reply via email to