cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ble...@apache.org
Subject [2/2] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11
Date Tue, 07 Feb 2017 09:48:37 GMT
Merge branch cassandra-3.0 into cassandra-3.11


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

Branch: refs/heads/cassandra-3.11
Commit: 3acdcaf8d3d3d5b959e4a14ac468d75d32b9177e
Parents: 97861e6 fb606dd
Author: Benjamin Lerer <b.lerer@gmail.com>
Authored: Tue Feb 7 10:42:20 2017 +0100
Committer: Benjamin Lerer <b.lerer@gmail.com>
Committed: Tue Feb 7 10:47:37 2017 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../cql3/statements/ModificationStatement.java  |  4 ++
 .../cql3/validation/operations/DeleteTest.java  | 54 ++++++++++++++++++++
 .../cql3/validation/operations/UpdateTest.java  | 54 ++++++++++++++++++--
 4 files changed, 110 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3acdcaf8/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 65efebc,4387019..e346722
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,6 +1,12 @@@
 -3.0.11
 +3.11.0
 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
 + * nodetool stopdaemon errors out (CASSANDRA-13030)
 + * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 + * Fix primary index calculation for SASI (CASSANDRA-12910)
 + * More fixes to the TokenAllocator (CASSANDRA-12990)
 + * NoReplicationTokenAllocator should work with zero replication factor (CASSANDRA-12983)
 +Merged from 3.0:
+  * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 - * Abort or retry on failed hints delivery (CASSANDRA-13124)
   * Fix handling of partition with partition-level deletion plus
     live rows in sstabledump (CASSANDRA-13177)
   * Provide user workaround when system_schema.columns does not contain entries

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3acdcaf8/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 08bb6ba,1722f02..832d417
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@@ -661,7 -657,11 +661,11 @@@ public abstract class ModificationState
          {
              NavigableSet<Clustering> clusterings = createClustering(options);
  
+             // If some of the restrictions were unspecified (e.g. empty IN restrictions)
we do not need to do anything.
 -            if (restrictions.hasClusteringColumnsRestriction() && clusterings.isEmpty())
++            if (restrictions.hasClusteringColumnsRestrictions() && clusterings.isEmpty())
+                 return;
+ 
 -            UpdateParameters params = makeUpdateParameters(keys, clusterings, options, local,
now);
 +            UpdateParameters params = makeUpdateParameters(keys, clusterings, options, local,
now, queryStartNanoTime);
  
              for (ByteBuffer key : keys)
              {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3acdcaf8/test/unit/org/apache/cassandra/cql3/validation/operations/DeleteTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3acdcaf8/test/unit/org/apache/cassandra/cql3/validation/operations/UpdateTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/cql3/validation/operations/UpdateTest.java
index 72d3466,a49f828..af6c4f9
--- a/test/unit/org/apache/cassandra/cql3/validation/operations/UpdateTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/operations/UpdateTest.java
@@@ -23,14 -23,13 +23,16 @@@ import java.util.Arrays
  import org.junit.Assert;
  import org.junit.Test;
  
--import static org.apache.commons.lang3.StringUtils.isEmpty;
 -import static org.junit.Assert.assertTrue;
--
 +import org.apache.cassandra.cql3.Attributes;
  import org.apache.cassandra.cql3.CQLTester;
 +import org.apache.cassandra.cql3.UntypedResultSet;
 +import org.apache.cassandra.cql3.UntypedResultSet.Row;
- import org.apache.cassandra.utils.ByteBufferUtil;
+ import org.apache.cassandra.db.ColumnFamilyStore;
+ import org.apache.cassandra.db.Keyspace;
+ 
++import static org.apache.commons.lang3.StringUtils.isEmpty;
++import static org.junit.Assert.assertTrue;
 +
  public class UpdateTest extends CQLTester
  {
      @Test


Mime
View raw message