cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ifesdj...@apache.org
Subject [3/3] cassandra git commit: Merge branch 'cassandra-3.11' into trunk
Date Fri, 12 May 2017 07:39:10 GMT
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: 501d0441c26a8b7f4266a423bde4cee7b0ac6f36
Parents: bf911cc f0319c8
Author: Alex Petrov <oleksandr.petrov@gmail.com>
Authored: Fri May 12 09:38:44 2017 +0200
Committer: Alex Petrov <oleksandr.petrov@gmail.com>
Committed: Fri May 12 09:38:44 2017 +0200

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../PartitionKeySingleRestrictionSet.java       |  3 +-
 .../cql3/restrictions/RestrictionSet.java       | 10 +++
 .../restrictions/RestrictionSetWrapper.java     |  5 ++
 .../cql3/restrictions/Restrictions.java         |  5 ++
 .../restrictions/StatementRestrictions.java     |  4 +-
 .../cql3/restrictions/TokenFilter.java          |  5 ++
 .../cql3/restrictions/TokenRestriction.java     | 10 +++
 .../SelectOrderedPartitionerTest.java           | 26 +++++++-
 .../cql3/validation/operations/SelectTest.java  | 64 ++++++++++++++++++--
 10 files changed, 122 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d06b06d,b13b777..9dc50b5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,72 -1,5 +1,73 @@@
 +4.0
 + * RangeStreamer should be smarter when picking endpoints for streaming (CASSANDRA-4650)
 + * Avoid rewrapping an exception thrown for cache load functions (CASSANDRA-13367)
 + * Log time elapsed for each incremental repair phase (CASSANDRA-13498)
 + * Add multiple table operation support to cassandra-stress (CASSANDRA-8780)
 + * Fix incorrect cqlsh results when selecting same columns multiple times (CASSANDRA-13262)
 + * Fix WriteResponseHandlerTest is sensitive to test execution order (CASSANDRA-13421)
 + * Improve incremental repair logging (CASSANDRA-13468)
 + * Start compaction when incremental repair finishes (CASSANDRA-13454)
 + * Add repair streaming preview (CASSANDRA-13257)
 + * Cleanup isIncremental/repairedAt usage (CASSANDRA-13430)
 + * Change protocol to allow sending key space independent of query string (CASSANDRA-10145)
 + * Make gc_log and gc_warn settable at runtime (CASSANDRA-12661)
 + * Take number of files in L0 in account when estimating remaining compaction tasks (CASSANDRA-13354)
 + * Skip building views during base table streams on range movements (CASSANDRA-13065)
 + * Improve error messages for +/- operations on maps and tuples (CASSANDRA-13197)
 + * Remove deprecated repair JMX APIs (CASSANDRA-11530)
 + * Fix version check to enable streaming keep-alive (CASSANDRA-12929)
 + * Make it possible to monitor an ideal consistency level separate from actual consistency
level (CASSANDRA-13289)
 + * Outbound TCP connections ignore internode authenticator (CASSANDRA-13324)
 + * Upgrade junit from 4.6 to 4.12 (CASSANDRA-13360)
 + * Cleanup ParentRepairSession after repairs (CASSANDRA-13359)
 + * Incremental repair not streaming correct sstables (CASSANDRA-13328)
 + * Upgrade the jna version to 4.3.0 (CASSANDRA-13300)
 + * Add the currentTimestamp, currentDate, currentTime and currentTimeUUID functions (CASSANDRA-13132)
 + * Remove config option index_interval (CASSANDRA-10671)
 + * Reduce lock contention for collection types and serializers (CASSANDRA-13271)
 + * Make it possible to override MessagingService.Verb ids (CASSANDRA-13283)
 + * Avoid synchronized on prepareForRepair in ActiveRepairService (CASSANDRA-9292)
 + * Adds the ability to use uncompressed chunks in compressed files (CASSANDRA-10520)
 + * Don't flush sstables when streaming for incremental repair (CASSANDRA-13226)
 + * Remove unused method (CASSANDRA-13227)
 + * Fix minor bugs related to #9143 (CASSANDRA-13217)
 + * Output warning if user increases RF (CASSANDRA-13079)
 + * Remove pre-3.0 streaming compatibility code for 4.0 (CASSANDRA-13081)
 + * Add support for + and - operations on dates (CASSANDRA-11936)
 + * Fix consistency of incrementally repaired data (CASSANDRA-9143)
 + * Increase commitlog version (CASSANDRA-13161)
 + * Make TableMetadata immutable, optimize Schema (CASSANDRA-9425)
 + * Refactor ColumnCondition (CASSANDRA-12981)
 + * Parallelize streaming of different keyspaces (CASSANDRA-4663)
 + * Improved compactions metrics (CASSANDRA-13015)
 + * Speed-up start-up sequence by avoiding un-needed flushes (CASSANDRA-13031)
 + * Use Caffeine (W-TinyLFU) for on-heap caches (CASSANDRA-10855)
 + * Thrift removal (CASSANDRA-11115)
 + * Remove pre-3.0 compatibility code for 4.0 (CASSANDRA-12716)
 + * Add column definition kind to dropped columns in schema (CASSANDRA-12705)
 + * Add (automate) Nodetool Documentation (CASSANDRA-12672)
 + * Update bundled cqlsh python driver to 3.7.0 (CASSANDRA-12736)
 + * Reject invalid replication settings when creating or altering a keyspace (CASSANDRA-12681)
 + * Clean up the SSTableReader#getScanner API wrt removal of RateLimiter (CASSANDRA-12422)
 + * Use new token allocation for non bootstrap case as well (CASSANDRA-13080)
 + * Avoid byte-array copy when key cache is disabled (CASSANDRA-13084)
 + * Require forceful decommission if number of nodes is less than replication factor (CASSANDRA-12510)
 + * Allow IN restrictions on column families with collections (CASSANDRA-12654)
 + * Log message size in trace message in OutboundTcpConnection (CASSANDRA-13028)
 + * Add timeUnit Days for cassandra-stress (CASSANDRA-13029)
 + * Add mutation size and batch metrics (CASSANDRA-12649)
 + * Add method to get size of endpoints to TokenMetadata (CASSANDRA-12999)
 + * Expose time spent waiting in thread pool queue (CASSANDRA-8398)
 + * Conditionally update index built status to avoid unnecessary flushes (CASSANDRA-12969)
 + * cqlsh auto completion: refactor definition of compaction strategy options (CASSANDRA-12946)
 + * Add support for arithmetic operators (CASSANDRA-11935)
 + * Add histogram for delay to deliver hints (CASSANDRA-13234)
 + * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
 + * Changing `max_hint_window_in_ms` at runtime (CASSANDRA-11720)
 +
 +
  3.11.0
+  * Allow CONTAINS statements filtering on the partition key and it’s parts (CASSANDRA-13275)
   * Fall back to even ranges calculation in clusters with vnodes when tokens are distributed
unevenly (CASSANDRA-13229)
   * Fix duration type validation to prevent overflow (CASSANDRA-13218)
   * Forbid unsupported creation of SASI indexes over partition key columns (CASSANDRA-13228)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/src/java/org/apache/cassandra/cql3/restrictions/PartitionKeySingleRestrictionSet.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/restrictions/PartitionKeySingleRestrictionSet.java
index 5113667,f2b427d..ac589be
--- a/src/java/org/apache/cassandra/cql3/restrictions/PartitionKeySingleRestrictionSet.java
+++ b/src/java/org/apache/cassandra/cql3/restrictions/PartitionKeySingleRestrictionSet.java
@@@ -135,8 -135,9 +135,9 @@@ final class PartitionKeySingleRestricti
      {
          if (isEmpty())
              return false;
+ 
          // slice or has unrestricted key component
-         return hasUnrestrictedPartitionKeyComponents(table) || hasSlice();
 -        return hasUnrestrictedPartitionKeyComponents(cfm) || hasSlice() || hasContains();
++        return hasUnrestrictedPartitionKeyComponents(table) || hasSlice() || hasContains();
      }
  
      @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/src/java/org/apache/cassandra/cql3/restrictions/RestrictionSet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/src/java/org/apache/cassandra/cql3/restrictions/RestrictionSetWrapper.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/src/java/org/apache/cassandra/cql3/restrictions/Restrictions.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/src/java/org/apache/cassandra/cql3/restrictions/StatementRestrictions.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/restrictions/StatementRestrictions.java
index 8431490,15a090b..b368c22
--- a/src/java/org/apache/cassandra/cql3/restrictions/StatementRestrictions.java
+++ b/src/java/org/apache/cassandra/cql3/restrictions/StatementRestrictions.java
@@@ -422,10 -427,9 +422,9 @@@ public final class StatementRestriction
              // - Is it queriable without 2ndary index, which is always more efficient
              // If a component of the partition key is restricted by a relation, all preceding
              // components must have a EQ. Only the last partition key component can be in
IN relation.
 -            if (partitionKeyRestrictions.needFiltering(cfm))
 +            if (partitionKeyRestrictions.needFiltering(table))
              {
-                 if (!allowFiltering && !forView && !hasQueriableIndex
-                     && (partitionKeyRestrictions.hasUnrestrictedPartitionKeyComponents(table)
|| partitionKeyRestrictions.hasSlice()))
+                 if (!allowFiltering && !forView && !hasQueriableIndex)
                      throw new InvalidRequestException(REQUIRES_ALLOW_FILTERING_MESSAGE);
  
                  if (partitionKeyRestrictions.hasIN())
@@@ -508,8 -514,9 +507,7 @@@
          }
          else
          {
 -            checkFalse(clusteringColumnsRestrictions.hasIN() && selectsComplexColumn,
 -                       "Cannot restrict clustering columns by IN relations when a collection
is selected by the query");
              checkFalse(clusteringColumnsRestrictions.hasContains() && !hasQueriableIndex
&& !allowFiltering,
- 
                         "Clustering columns can only be restricted with CONTAINS with a secondary
index or filtering");
  
              if (hasClusteringColumnsRestrictions() && clusteringColumnsRestrictions.needFiltering())

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/src/java/org/apache/cassandra/cql3/restrictions/TokenFilter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/src/java/org/apache/cassandra/cql3/restrictions/TokenRestriction.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/test/unit/org/apache/cassandra/cql3/validation/operations/SelectOrderedPartitionerTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/501d0441/test/unit/org/apache/cassandra/cql3/validation/operations/SelectTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/cql3/validation/operations/SelectTest.java
index 8aec899,9a24bd0..c0a8a9c
--- a/test/unit/org/apache/cassandra/cql3/validation/operations/SelectTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/operations/SelectTest.java
@@@ -2306,8 -2306,9 +2306,8 @@@ public class SelectTest extends CQLTest
      @Test
      public void testIndexQueryWithValueOver64K() throws Throwable
      {
-         createTable("CREATE TABLE %s (a int, b int, c blob, PRIMARY KEY (a, b))");
-         createIndex("CREATE INDEX test ON %s (c)");
+         String tableName = createTable("CREATE TABLE %s (a int, b int, c blob, PRIMARY KEY
(a, b))");
 -        String idx = tableName + "_c_idx";
 -        createIndex("CREATE INDEX " + idx + " ON %s (c)");
++        String idx = createIndex("CREATE INDEX ON %s (c)");
  
          execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?)", 0, 0, bytes(1));
          execute("INSERT INTO %s (a, b, c) VALUES (?, ?, ?)", 0, 1, bytes(2));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message