Merge branch 'cassandra-3.0' into cassandra-3.9

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

Branch: refs/heads/cassandra-3.9
Commit: 5fb6f95859f3b08e1037439ce1fe1475434af1dd
Parents: 8e775ea 1823c84
Author: Robert Stupp <sn...@snazy.de>
Authored: Sat Jul 30 11:32:45 2016 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Sat Jul 30 11:32:45 2016 +0200

----------------------------------------------------------------------
 .../apache/cassandra/db/ColumnFamilyStore.java  | 27 +++++++++++++-------
 1 file changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5fb6f958/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 62914a2,400fd36..9d31b60
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -1337,15 -1224,24 +1337,24 @@@ public class ColumnFamilyStore implemen
  
      {
          long start = System.nanoTime();
-         Memtable mt = data.getMemtableFor(opGroup, commitLogPosition);
-         long timeDelta = mt.put(update, indexer, opGroup);
-         DecoratedKey key = update.partitionKey();
-         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);
-         if(timeDelta < Long.MAX_VALUE)
-             metric.colUpdateTimeDeltaHistogram.update(timeDelta);
 -        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);
+             if(timeDelta < Long.MAX_VALUE)
+                 metric.colUpdateTimeDeltaHistogram.update(timeDelta);
+         }
+         catch (RuntimeException e)
+         {
+             throw new RuntimeException(e.getMessage()
 -                                                     + " for ks: "
 -                                                     + keyspace.getName() + 
", table: " + name, e);
++                                       + " for ks: "
++                                       + keyspace.getName() + ", table: " + 
name, e);
+         }
 -
      }
  
      /**

Reply via email to