cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sn...@apache.org
Subject [1/4] cassandra git commit: Only check KeyCache when it is enabled
Date Mon, 31 Aug 2015 09:08:36 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 3d5742814 -> 0828e2499


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-3.0
Commit: 8a8a5a42862a9cbe5a7c73932ac315acd7b2190f
Parents: 264cf36
Author: Chris Burroughs <chris.burroughs+apache@gmail.com>
Authored: Mon Aug 31 11:04:07 2015 +0200
Committer: Robert Stupp <snazy@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);


Mime
View raw message