cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/3] git commit: Fix loading key cache when a saved entry is no longer valid patch by Fabien Rousseau; reviewed by jbellis for CASSANDRA-5706
Date Fri, 28 Jun 2013 15:31:08 GMT
Updated Branches:
  refs/heads/cassandra-1.2 9837173d8 -> 43a98c212
  refs/heads/trunk cc83177af -> 66fe21647


Fix loading key cache when a saved entry is no longer valid
patch by Fabien Rousseau; reviewed by jbellis for CASSANDRA-5706


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

Branch: refs/heads/cassandra-1.2
Commit: 43a98c21204648549062f66be09b30dccbfd9a21
Parents: 9837173
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Jun 28 08:28:09 2013 -0700
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Jun 28 08:28:09 2013 -0700

----------------------------------------------------------------------
 CHANGES.txt                                           | 14 ++++++++++----
 .../org/apache/cassandra/service/CacheService.java    | 12 ++++++------
 2 files changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/43a98c21/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ee21526..1b9634c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,11 +1,15 @@
 1.2.7
+ * Fix loading key cache when a saved entry is no longer valid (CASSANDRA-5706)
  * Fix serialization of the LEFT gossip value (CASSANDRA-5696)
  * Pig: support for cql3 tables (CASSANDRA-5234)
  * cqlsh: Don't show 'null' in place of empty values (CASSANDRA-5675)
- * Race condition in detecting version on a mixed 1.1/1.2 cluster (CASSANDRA-5692)
+ * Race condition in detecting version on a mixed 1.1/1.2 cluster 
+   (CASSANDRA-5692)
+
 
 1.2.6
- * Fix tracing when operation completes before all responses arrive (CASSANDRA-5668)
+ * Fix tracing when operation completes before all responses arrive 
+   (CASSANDRA-5668)
  * Fix cross-DC mutation forwarding (CASSANDRA-5632)
  * Scale hinted_handoff_throttle_in_kb to cluster size (CASSANDRA-5272)
  * (Hadoop) Add CQL3 input/output formats (CASSANDRA-4421, 5622)
@@ -31,14 +35,16 @@
  * Correct blob literal + ReversedType parsing (CASSANDRA-5629)
  * Allow GPFS to prefer the internal IP like EC2MRS (CASSANDRA-5630)
  * fix help text for -tspw cassandra-cli (CASSANDRA-5643)
- * don't throw away initial causes exceptions for internode encryption issues (CASSANDRA-5644)
+ * don't throw away initial causes exceptions for internode encryption issues 
+   (CASSANDRA-5644)
  * Fix message spelling errors for cql select statements (CASSANDRA-5647)
  * Suppress custom exceptions thru jmx (CASSANDRA-5652)
  * Update CREATE CUSTOM INDEX syntax (CASSANDRA-5639)
  * Fix PermissionDetails.equals() method (CASSANDRA-5655)
  * Never allow partition key ranges in CQL3 without token() (CASSANDRA-5666)
  * Gossiper incorrectly drops AppState for an upgrading node (CASSANDRA-5660)
- * Connection thrashing during multi-region ec2 during upgrade, due to messaging version
(CASSANDRA-5669)
+ * Connection thrashing during multi-region ec2 during upgrade, due to 
+   messaging version (CASSANDRA-5669)
  * Avoid over reconnecting in EC2MRS (CASSANDRA-5678)
  * Fix ReadResponseSerializer.serializedSize() for digest reads (CASSANDRA-5476)
  * allow sstable2json on 2i CFs (CASSANDRA-5694)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/43a98c21/src/java/org/apache/cassandra/service/CacheService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CacheService.java b/src/java/org/apache/cassandra/service/CacheService.java
index bc218c4..f77110c 100644
--- a/src/java/org/apache/cassandra/service/CacheService.java
+++ b/src/java/org/apache/cassandra/service/CacheService.java
@@ -379,16 +379,16 @@ public class CacheService implements CacheServiceMBean
             ByteBuffer key = ByteBufferUtil.readWithLength(input);
             int generation = input.readInt();
             SSTableReader reader = findDesc(generation, cfs.getSSTables());
+            boolean promotedIndexes = input.readBoolean();
             if (reader == null)
             {
-                RowIndexEntry.serializer.skipPromotedIndex(input);
+                if (promotedIndexes)
+                    RowIndexEntry.serializer.skip(input, Descriptor.Version.CURRENT);
                 return null;
             }
-            RowIndexEntry entry;
-            if (input.readBoolean())
-                entry = RowIndexEntry.serializer.deserialize(input, reader.descriptor.version);
-            else
-                entry = reader.getPosition(reader.partitioner.decorateKey(key), Operator.EQ);
+            RowIndexEntry entry = promotedIndexes
+                                ? RowIndexEntry.serializer.deserialize(input, reader.descriptor.version)
+                                : reader.getPosition(reader.partitioner.decorateKey(key),
Operator.EQ);
             return Futures.immediateFuture(Pair.create(new KeyCacheKey(reader.descriptor,
key), entry));
         }
 


Mime
View raw message