You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2014/06/03 18:03:28 UTC

[3/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/service/StorageProxy.java


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

Branch: refs/heads/cassandra-2.0
Commit: e8aaffa1b75f48d8aa230909ae0fe77aa1de723c
Parents: 2800c7f 12a7a7e
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Tue Jun 3 19:03:16 2014 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Tue Jun 3 19:03:16 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                           |  1 +
 src/java/org/apache/cassandra/db/CounterMutation.java |  3 ++-
 .../org/apache/cassandra/service/StorageProxy.java    | 14 ++++++++++++--
 3 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8aaffa1/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 37105f3,8014170..91cac4f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,61 -1,7 +1,62 @@@
 -1.2.17
 - * Fix handling of empty counter replication mutations (CASSANDRA-7144)
 +2.0.9
 + * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 + * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 + * Swap local and global default read repair chances (CASSANDRA-7320)
 + * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 + * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 + * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 + * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 + * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 + * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 + * Add authentication support to shuffle (CASSANDRA-6484)
 + * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
 + * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
 + * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 +Merged from 1.2:
 + * Fix availability validation for LOCAL_ONE CL (CASSANDRA-7319)
   * Use LOCAL_ONE for non-superuser auth queries (CASSANDRA-7328)
 - * Set keepalive on MessagingService connections (CASSANDRA-7170)
++ * Fix handling of empty counter replication mutations (CASSANDRA-7144)
 +
 +
 +2.0.8
 + * Always reallocate buffers in HSHA (CASSANDRA-6285)
 + * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)
 + * (Hadoop) Close java driver Cluster in CQLRR.close (CASSANDRA-7228)
 + * Fix potential SlabAllocator yield-starvation (CASSANDRA-7133)
 + * Warn when 'USING TIMESTAMP' is used on a CAS BATCH (CASSANDRA-7067)
 + * Starting threads in OutboundTcpConnectionPool constructor causes race conditions (CASSANDRA-7177)
 + * return all cpu values from BackgroundActivityMonitor.readAndCompute (CASSANDRA-7183)
 + * fix c* launch issues on Russian os's due to output of linux 'free' cmd (CASSANDRA-6162)
 + * Fix disabling autocompaction (CASSANDRA-7187)
 + * Fix potential NumberFormatException when deserializing IntegerType (CASSANDRA-7088)
 + * cqlsh can't tab-complete disabling compaction (CASSANDRA-7185)
 + * cqlsh: Accept and execute CQL statement(s) from command-line parameter (CASSANDRA-7172)
 + * Fix IllegalStateException in CqlPagingRecordReader (CASSANDRA-7198)
 + * Fix the InvertedIndex trigger example (CASSANDRA-7211)
 + * Correctly delete scheduled range xfers (CASSANDRA-7143)
 + * Make batchlog replica selection rack-aware (CASSANDRA-6551)
 + * Allow overriding cassandra-rackdc.properties file (CASSANDRA-7072)
 + * Set JMX RMI port to 7199 (CASSANDRA-7087)
 + * Use LOCAL_QUORUM for data reads at LOCAL_SERIAL (CASSANDRA-6939)
 + * Log a warning for large batches (CASSANDRA-6487)
 + * Queries on compact tables can return more rows that requested (CASSANDRA-7052)
 + * USING TIMESTAMP for batches does not work (CASSANDRA-7053)
 + * Fix performance regression from CASSANDRA-5614 (CASSANDRA-6949)
 + * Merge groupable mutations in TriggerExecutor#execute() (CASSANDRA-7047)
 + * Fix CFMetaData#getColumnDefinitionFromColumnName() (CASSANDRA-7074)
 + * Plug holes in resource release when wiring up StreamSession (CASSANDRA-7073)
 + * Re-add parameter columns to tracing session (CASSANDRA-6942)
 + * Fix writetime/ttl functions for static columns (CASSANDRA-7081)
 + * Suggest CTRL-C or semicolon after three blank lines in cqlsh (CASSANDRA-7142)
 + * Add --resolve-ip option to 'nodetool ring' (CASSANDRA-7210)
 + * Fix duplicated error messages on directory creation error at startup (CASSANDRA-5818)
 + * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
 + * Proper null handle for IF with map element access (CASSANDRA-7155)
 + * Improve compaction visibility (CASSANDRA-7242)
 + * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
 + * Invalid key cache entries on DROP (CASSANDRA-6525)
 + * Fix flapping RecoveryManagerTest (CASSANDRA-7084)
 +Merged from 1.2:
   * Add Cloudstack snitch (CASSANDRA-7147)
   * Update system.peers correctly when relocating tokens (CASSANDRA-7126)
   * Add Google Compute Engine snitch (CASSANDRA-7132)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8aaffa1/src/java/org/apache/cassandra/db/CounterMutation.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/CounterMutation.java
index fb363c2,76aaeb5..3caeda5
--- a/src/java/org/apache/cassandra/db/CounterMutation.java
+++ b/src/java/org/apache/cassandra/db/CounterMutation.java
@@@ -102,19 -92,21 +102,20 @@@ public class CounterMutation implement
                  continue;
  
              ColumnFamily cf = row.cf;
 -            if (cf.isSuper())
 -                cf.retainAll(rowMutation.getColumnFamily(cf.metadata().cfId));
              replicationMutation.add(cf);
          }
-         return replicationMutation;
+ 
+         return replicationMutation.isEmpty() ? null : replicationMutation;
      }
  
 -    private void addReadCommandFromColumnFamily(String table, ByteBuffer key, ColumnFamily columnFamily, List<ReadCommand> commands)
 +    private void addReadCommandFromColumnFamily(String keyspaceName, ByteBuffer key, ColumnFamily columnFamily, long timestamp, List<ReadCommand> commands)
      {
 -        QueryPath queryPath = new QueryPath(columnFamily.metadata().cfName);
 -        commands.add(new SliceByNamesReadCommand(table, key, queryPath, columnFamily.getColumnNames()));
 +        SortedSet<ByteBuffer> s = new TreeSet<ByteBuffer>(columnFamily.metadata().comparator);
 +        Iterables.addAll(s, columnFamily.getColumnNames());
 +        commands.add(new SliceByNamesReadCommand(keyspaceName, key, columnFamily.metadata().cfName, timestamp, new NamesQueryFilter(s)));
      }
  
 -    public MessageOut<CounterMutation> makeMutationMessage() throws IOException
 +    public MessageOut<CounterMutation> makeMutationMessage()
      {
          return new MessageOut<CounterMutation>(MessagingService.Verb.COUNTER_MUTATION, this, serializer);
      }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8aaffa1/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/StorageProxy.java
index 2bf8e7f,d17dea9..59834cf
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@@ -1077,8 -781,18 +1077,18 @@@ public class StorageProxy implements St
                      {
                          public void runMayThrow() throws OverloadedException
                          {
-                             // send mutation to other replica
-                             sendToHintedEndpoints(cm.makeReplicationMutation(), remotes, responseHandler, localDataCenter);
+                             // send the mutation to other replicas, if not null (see CASSANDRA-7144 for details)
+                             RowMutation replicationMutation = cm.makeReplicationMutation();
+                             if (replicationMutation != null)
+                             {
 -                                sendToHintedEndpoints(replicationMutation, remotes, responseHandler, localDataCenter, consistency_level);
++                                sendToHintedEndpoints(replicationMutation, remotes, responseHandler, localDataCenter);
+                             }
+                             else
+                             {
+                                 // simulate the rest of the responses to avoid the timeout
+                                 for (int i = 0; i < remotes.size(); i++)
+                                     responseHandler.response(null);
+                             }
                          }
                      });
                  }