Include table name in "Cannot get comparator" exception

patch by sankalp kohli; reviewed by Robert Stupp for CASSANDRA-12181


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

Branch: refs/heads/trunk
Commit: 1823c84b827ff5f38862757db58001105f1d753f
Parents: 8868b74
Author: sankalp kohli <sank...@apple.com>
Authored: Sat Jul 30 11:30:01 2016 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Sat Jul 30 11:30:01 2016 +0200

----------------------------------------------------------------------
 .../apache/cassandra/db/ColumnFamilyStore.java  | 24 ++++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1823c84b/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 1e52b13..400fd36 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1225,13 +1225,23 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
     {
         long start = System.nanoTime();
         Memtable mt = data.getMemtableFor(opGroup, replayPosition);
-        long timeDelta = mt.put(update, indexer, opGroup);
-        DecoratedKey key = update.partitionKey();
-        maybeUpdateRowCache(key);
-        metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
-        metric.writeLatency.addNano(System.nanoTime() - start);
-        if(timeDelta < Long.MAX_VALUE)
-            metric.colUpdateTimeDeltaHistogram.update(timeDelta);
+        try
+        {
+            long timeDelta = mt.put(update, indexer, opGroup);
+            DecoratedKey key = update.partitionKey();
+            maybeUpdateRowCache(key);
+            metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
+            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);
+        }
+
     }
 
     /**

Reply via email to