You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by bl...@apache.org on 2016/07/14 09:54:24 UTC

[2/4] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.9

Merge branch cassandra-3.0 into cassandra-3.9


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

Branch: refs/heads/trunk
Commit: fb4eb5ac1898bb47fb0d3f5d608bee92df2c4256
Parents: 76188e9 fbd287a
Author: Benjamin Lerer <b....@gmail.com>
Authored: Thu Jul 14 11:37:20 2016 +0200
Committer: Benjamin Lerer <b....@gmail.com>
Committed: Thu Jul 14 11:37:20 2016 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  5 ++
 .../cassandra/config/DatabaseDescriptor.java    |  1 +
 .../cassandra/db/PartitionRangeReadCommand.java |  7 +--
 .../org/apache/cassandra/db/ReadCommand.java    | 65 ++++++++++----------
 .../org/apache/cassandra/db/ReadResponse.java   | 43 +++++--------
 .../db/SinglePartitionReadCommand.java          |  2 +-
 .../io/ForwardingVersionedSerializer.java       | 57 +++++++++++++++++
 .../apache/cassandra/net/MessagingService.java  |  6 +-
 8 files changed, 117 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4eb5ac/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index da8216f,3829046..bedba6d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,9 -1,5 +1,14 @@@
++<<<<<<< HEAD
 +3.9
 + * Partial revert of CASSANDRA-11971, cannot recycle buffer in SP.sendMessagesToNonlocalDC (CASSANDRA-11950)
 + * Fix hdr logging for single operation workloads (CASSANDRA-12145)
 + * Fix SASI PREFIX search in CONTAINS mode with partial terms (CASSANDRA-12073)
 + * Increase size of flushExecutor thread pool (CASSANDRA-12071)
 +Merged from 3.0:
++=======
+ 3.0.9
+  * Wait until the message is being send to decide which serializer must be used (CASSANDRA-11393)
++>>>>>>> asf/cassandra-3.0
   * Fix migration of static thrift column names with non-text comparators (CASSANDRA-12147)
   * Fix upgrading sparse tables that are incorrectly marked as dense (CASSANDRA-11315)
   * Fix reverse queries ignoring range tombstones (CASSANDRA-11733)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4eb5ac/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4eb5ac/src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4eb5ac/src/java/org/apache/cassandra/db/ReadCommand.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ReadCommand.java
index c842814,36969f8..68c9e3b
--- a/src/java/org/apache/cassandra/db/ReadCommand.java
+++ b/src/java/org/apache/cassandra/db/ReadCommand.java
@@@ -56,14 -54,44 +57,44 @@@ import org.apache.cassandra.utils.Pair
   * <p>
   * This contains all the informations needed to do a local read.
   */
 -public abstract class ReadCommand implements ReadQuery
 +public abstract class ReadCommand extends MonitorableImpl implements ReadQuery
  {
 +    private static final int TEST_ITERATION_DELAY_MILLIS = Integer.valueOf(System.getProperty("cassandra.test.read_iteration_delay_ms", "0"));
      protected static final Logger logger = LoggerFactory.getLogger(ReadCommand.class);
 -
      public static final IVersionedSerializer<ReadCommand> serializer = new Serializer();
+ 
+     // For READ verb: will either dispatch on 'serializer' for 3.0 or 'legacyReadCommandSerializer' for earlier version.
+     // Can be removed (and replaced by 'serializer') once we drop pre-3.0 backward compatibility.
+     public static final IVersionedSerializer<ReadCommand> readSerializer = new ForwardingVersionedSerializer<ReadCommand>()
+     {
+         protected IVersionedSerializer<ReadCommand> delegate(int version)
+         {
+             return version < MessagingService.VERSION_30
+                     ? legacyReadCommandSerializer : serializer;
+         }
+     };
+ 
      // For RANGE_SLICE verb: will either dispatch on 'serializer' for 3.0 or 'legacyRangeSliceCommandSerializer' for earlier version.
      // Can be removed (and replaced by 'serializer') once we drop pre-3.0 backward compatibility.
-     public static final IVersionedSerializer<ReadCommand> rangeSliceSerializer = new RangeSliceSerializer();
+     public static final IVersionedSerializer<ReadCommand> rangeSliceSerializer = new ForwardingVersionedSerializer<ReadCommand>()
+     {
+         protected IVersionedSerializer<ReadCommand> delegate(int version)
+         {
+             return version < MessagingService.VERSION_30
+                     ? legacyRangeSliceCommandSerializer : serializer;
+         }
+     };
+ 
+     // For PAGED_RANGE verb: will either dispatch on 'serializer' for 3.0 or 'legacyPagedRangeCommandSerializer' for earlier version.
+     // Can be removed (and replaced by 'serializer') once we drop pre-3.0 backward compatibility.
+     public static final IVersionedSerializer<ReadCommand> pagedRangeSerializer = new ForwardingVersionedSerializer<ReadCommand>()
+     {
+         protected IVersionedSerializer<ReadCommand> delegate(int version)
+         {
+             return version < MessagingService.VERSION_30
+                     ? legacyPagedRangeCommandSerializer : serializer;
+         }
+     };
  
      public static final IVersionedSerializer<ReadCommand> legacyRangeSliceCommandSerializer = new LegacyRangeSliceCommandSerializer();
      public static final IVersionedSerializer<ReadCommand> legacyPagedRangeCommandSerializer = new LegacyPagedRangeCommandSerializer();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4eb5ac/src/java/org/apache/cassandra/db/ReadResponse.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4eb5ac/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fb4eb5ac/src/java/org/apache/cassandra/net/MessagingService.java
----------------------------------------------------------------------