Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 f2b66166a -> c870adc2f


Only check KeyCache when it is enabled

patch by Chris Burroughs; reviewed by Robert Stupp for CASSANDRA-9872


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

Branch: refs/heads/cassandra-2.2
Commit: 8a8a5a42862a9cbe5a7c73932ac315acd7b2190f
Parents: 264cf36
Author: Chris Burroughs <chris.burroughs+apa...@gmail.com>
Authored: Mon Aug 31 11:04:07 2015 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Mon Aug 31 11:04:07 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 src/java/org/apache/cassandra/io/sstable/SSTableReader.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8a8a5a42/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 26dc34b..7841f9b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.10
+ * Only check KeyCache when it is enabled
  * Change streaming_socket_timeout_in_ms default to 1 hour (CASSANDRA-8611)
  * (cqlsh) update list of CQL keywords (CASSANDRA-9232)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8a8a5a42/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java 
b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
index 32eb1b9..86f6a23 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
@@ -1539,7 +1539,7 @@ public class SSTableReader extends SSTable implements 
SelfRefCounted<SSTableRead
 
     private RowIndexEntry getCachedPosition(KeyCacheKey unifiedKey, boolean 
updateStats)
     {
-        if (keyCache != null && keyCache.getCapacity() > 0) {
+        if (keyCache != null && keyCache.getCapacity() > 0 && 
metadata.getCaching().keyCache.isEnabled()) {
             if (updateStats)
             {
                 RowIndexEntry cachedEntry = keyCache.get(unifiedKey);

Reply via email to