You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2013/06/28 17:31:08 UTC

[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

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 <jb...@apache.org>
Authored: Fri Jun 28 08:28:09 2013 -0700
Committer: Jonathan Ellis <jb...@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));
         }
 


[3/3] git commit: merge from 1.2

Posted by jb...@apache.org.
merge from 1.2


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

Branch: refs/heads/trunk
Commit: 66fe21647e6e8c9e5485632f43f011e4c4faee00
Parents: cc83177 43a98c2
Author: Jonathan Ellis <jb...@apache.org>
Authored: Fri Jun 28 08:31:01 2013 -0700
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Fri Jun 28 08:31:01 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/66fe2164/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 7565017,1b9634c..87aa99d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,81 -1,15 +1,85 @@@
 +2.0
 + * Removed on-heap row cache (CASSANDRA-5348)
 + * use nanotime consistently for node-local timeouts (CASSANDRA-5581)
 + * Avoid unnecessary second pass on name-based queries (CASSANDRA-5577)
 + * Experimental triggers (CASSANDRA-1311)
 + * JEMalloc support for off-heap allocation (CASSANDRA-3997)
 + * Single-pass compaction (CASSANDRA-4180)
 + * Removed token range bisection (CASSANDRA-5518)
 + * Removed compatibility with pre-1.2.5 sstables and network messages
 +   (CASSANDRA-5511)
 + * removed PBSPredictor (CASSANDRA-5455)
 + * CAS support (CASSANDRA-5062, 5441, 5442, 5443, 5619)
 + * Leveled compaction performs size-tiered compactions in L0 
 +   (CASSANDRA-5371, 5439)
 + * Add yaml network topology snitch for mixed ec2/other envs (CASSANDRA-5339)
 + * Log when a node is down longer than the hint window (CASSANDRA-4554)
 + * Optimize tombstone creation for ExpiringColumns (CASSANDRA-4917)
 + * Improve LeveledScanner work estimation (CASSANDRA-5250, 5407)
 + * Replace compaction lock with runWithCompactionsDisabled (CASSANDRA-3430)
 + * Change Message IDs to ints (CASSANDRA-5307)
 + * Move sstable level information into the Stats component, removing the
 +   need for a separate Manifest file (CASSANDRA-4872)
 + * avoid serializing to byte[] on commitlog append (CASSANDRA-5199)
 + * make index_interval configurable per columnfamily (CASSANDRA-3961, CASSANDRA-5650)
 + * add default_time_to_live (CASSANDRA-3974)
 + * add memtable_flush_period_in_ms (CASSANDRA-4237)
 + * replace supercolumns internally by composites (CASSANDRA-3237, 5123)
 + * upgrade thrift to 0.9.0 (CASSANDRA-3719)
 + * drop unnecessary keyspace parameter from user-defined compaction API 
 +   (CASSANDRA-5139)
 + * more robust solution to incomplete compactions + counters (CASSANDRA-5151)
 + * Change order of directory searching for c*.in.sh (CASSANDRA-3983)
 + * Add tool to reset SSTable compaction level for LCS (CASSANDRA-5271)
 + * Allow custom configuration loader (CASSANDRA-5045)
 + * Remove memory emergency pressure valve logic (CASSANDRA-3534)
 + * Reduce request latency with eager retry (CASSANDRA-4705)
 + * cqlsh: Remove ASSUME command (CASSANDRA-5331)
 + * Rebuild BF when loading sstables if bloom_filter_fp_chance
 +   has changed since compaction (CASSANDRA-5015)
 + * remove row-level bloom filters (CASSANDRA-4885)
 + * Change Kernel Page Cache skipping into row preheating (disabled by default)
 +   (CASSANDRA-4937)
 + * Improve repair by deciding on a gcBefore before sending
 +   out TreeRequests (CASSANDRA-4932)
 + * Add an official way to disable compactions (CASSANDRA-5074)
 + * Reenable ALTER TABLE DROP with new semantics (CASSANDRA-3919)
 + * Add binary protocol versioning (CASSANDRA-5436)
 + * Swap THshaServer for TThreadedSelectorServer (CASSANDRA-5530)
 + * Add alias support to SELECT statement (CASSANDRA-5075)
 + * Don't create empty RowMutations in CommitLogReplayer (CASSANDRA-5541)
 + * Use range tombstones when dropping cfs/columns from schema (CASSANDRA-5579)
 + * cqlsh: drop CQL2/CQL3-beta support (CASSANDRA-5585)
 + * Track max/min column names in sstables to be able to optimize slice
 +   queries (CASSANDRA-5514, CASSANDRA-5595, CASSANDRA-5600)
 + * Binary protocol: allow batching already prepared statements (CASSANDRA-4693)
 + * Allow preparing timestamp, ttl and limit in CQL3 queries (CASSANDRA-4450)
 + * Support native link w/o JNA in Java7 (CASSANDRA-3734)
 + * Use SASL authentication in binary protocol v2 (CASSANDRA-5545)
 + * Replace Thrift HsHa with LMAX Disruptor based implementation (CASSANDRA-5582)
 + * cqlsh: Add row count to SELECT output (CASSANDRA-5636)
 + * Include a timestamp with all read commands to determine column expiration
 +   (CASSANDRA-5149)
 + * Streaming 2.0 (CASSANDRA-5286)
 + * Conditional create/drop ks/table/index statements in CQL3 (CASSANDRA-2737)
 + * more pre-table creation property validation (CASSANDRA-5693)
 + * Redesign repair messages (CASSANDRA-5426)
 + * Fix ALTER RENAME post-5125 (CASSANDRA-5702)
 + * Disallow renaming a 2ndary indexed column (CASSANDRA-5705)
 + * Rename Table to Keyspace (CASSANDRA-5613)
 +
 +
  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)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/66fe2164/src/java/org/apache/cassandra/service/CacheService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/CacheService.java
index b3cef49,f77110c..5c4345f
--- a/src/java/org/apache/cassandra/service/CacheService.java
+++ b/src/java/org/apache/cassandra/service/CacheService.java
@@@ -337,14 -379,16 +337,13 @@@ public class CacheService implements Ca
              ByteBuffer key = ByteBufferUtil.readWithLength(input);
              int generation = input.readInt();
              SSTableReader reader = findDesc(generation, cfs.getSSTables());
 -            boolean promotedIndexes = input.readBoolean();
++            input.readBoolean(); // backwards compatibility for "promoted indexes" boolean
              if (reader == null)
              {
 -                if (promotedIndexes)
 -                    RowIndexEntry.serializer.skip(input, Descriptor.Version.CURRENT);
 +                RowIndexEntry.serializer.skipPromotedIndex(input);
                  return null;
              }
-             RowIndexEntry entry;
-             input.readBoolean(); // backwards compatibility for "promoted indexes" boolean
-             entry = RowIndexEntry.serializer.deserialize(input, reader.descriptor.version);
 -            RowIndexEntry entry = promotedIndexes
 -                                ? RowIndexEntry.serializer.deserialize(input, reader.descriptor.version)
 -                                : reader.getPosition(reader.partitioner.decorateKey(key), Operator.EQ);
++            RowIndexEntry entry = RowIndexEntry.serializer.deserialize(input, reader.descriptor.version);
              return Futures.immediateFuture(Pair.create(new KeyCacheKey(reader.descriptor, key), entry));
          }
  


[2/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

Posted by jb...@apache.org.
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/trunk
Commit: 43a98c21204648549062f66be09b30dccbfd9a21
Parents: 9837173
Author: Jonathan Ellis <jb...@apache.org>
Authored: Fri Jun 28 08:28:09 2013 -0700
Committer: Jonathan Ellis <jb...@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));
         }