Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
        CHANGES.txt
        src/java/org/apache/cassandra/cql3/statements/ColumnGroupMap.java
        src/java/org/apache/cassandra/db/DataRange.java
        src/java/org/apache/cassandra/db/PagedRangeCommand.java


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

Branch: refs/heads/trunk
Commit: 6fe6d65d5a0cd670bcd4590fcad2db62699de028
Parents: 6f42afa 2acbab6
Author: Tyler Hobbs <tylerho...@apache.org>
Authored: Fri Dec 19 12:11:06 2014 -0600
Committer: Tyler Hobbs <tylerho...@apache.org>
Committed: Fri Dec 19 12:11:06 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../apache/cassandra/db/ColumnFamilyStore.java  |  6 ++--
 src/java/org/apache/cassandra/db/DataRange.java | 29 ++++++++++++++------
 .../cassandra/db/filter/SliceQueryFilter.java   |  6 +++-
 4 files changed, 32 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fe6d65d/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index ddc25cd,bd128f5..84becc0
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,46 -1,6 +1,48 @@@
 -2.0.12:
 +2.1.3
 + * Fix regression in SSTableRewriter causing some rows to become unreadable 
 +   during compaction (CASSANDRA-8429)
 + * Run major compactions for repaired/unrepaired in parallel (CASSANDRA-8510)
 + * (cqlsh) Fix compression options in DESCRIBE TABLE output when compression
 +   is disabled (CASSANDRA-8288)
 + * (cqlsh) Fix DESCRIBE output after keyspaces are altered (CASSANDRA-7623)
 + * Make sure we set lastCompactedKey correctly (CASSANDRA-8463)
 + * (cqlsh) Fix output of CONSISTENCY command (CASSANDRA-8507)
 + * (cqlsh) Fixed the handling of LIST statements (CASSANDRA-8370)
 + * Make sstablescrub check leveled manifest again (CASSANDRA-8432)
 + * Check first/last keys in sstable when giving out positions (CASSANDRA-8458)
 + * Disable mmap on Windows (CASSANDRA-6993)
 + * Add missing ConsistencyLevels to cassandra-stress (CASSANDRA-8253)
 + * Add auth support to cassandra-stress (CASSANDRA-7985)
 + * Fix ArrayIndexOutOfBoundsException when generating error message
 +   for some CQL syntax errors (CASSANDRA-8455)
 + * Scale memtable slab allocation logarithmically (CASSANDRA-7882)
 + * cassandra-stress simultaneous inserts over same seed (CASSANDRA-7964)
 + * Reduce cassandra-stress sampling memory requirements (CASSANDRA-7926)
 + * Ensure memtable flush cannot expire commit log entries from its future 
(CASSANDRA-8383)
 + * Make read "defrag" async to reclaim memtables (CASSANDRA-8459)
 + * Remove tmplink files for offline compactions (CASSANDRA-8321)
 + * Reduce maxHintsInProgress (CASSANDRA-8415)
 + * BTree updates may call provided update function twice (CASSANDRA-8018)
 + * Release sstable references after anticompaction (CASSANDRA-8386)
 + * Handle abort() in SSTableRewriter properly (CASSANDRA-8320)
 + * Fix high size calculations for prepared statements (CASSANDRA-8231)
 + * Centralize shared executors (CASSANDRA-8055)
 + * Fix filtering for CONTAINS (KEY) relations on frozen collection
 +   clustering columns when the query is restricted to a single
 +   partition (CASSANDRA-8203)
 + * Do more aggressive entire-sstable TTL expiry checks (CASSANDRA-8243)
 + * Add more log info if readMeter is null (CASSANDRA-8238)
 + * add check of the system wall clock time at startup (CASSANDRA-8305)
 + * Support for frozen collections (CASSANDRA-7859)
 + * Fix overflow on histogram computation (CASSANDRA-8028)
 + * Have paxos reuse the timestamp generation of normal queries 
(CASSANDRA-7801)
 + * Fix incremental repair not remove parent session on remote (CASSANDRA-8291)
 + * Improve JBOD disk utilization (CASSANDRA-7386)
 + * Log failed host when preparing incremental repair (CASSANDRA-8228)
 + * Force config client mode in CQLSSTableWriter (CASSANDRA-8281)
 +Merged from 2.0:
+  * Fix non-distinct results in DISTNCT queries on static columns when
+    paging is enabled (CASSANDRA-8087)
   * Move all hints related tasks to hints internal executor (CASSANDRA-8285)
   * Fix paging for multi-partition IN queries (CASSANDRA-8408)
   * Fix MOVED_NODE topology event never being emitted when a node

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fe6d65d/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fe6d65d/src/java/org/apache/cassandra/db/DataRange.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/DataRange.java
index 31a9370,b8b8daf..a67105b
--- a/src/java/org/apache/cassandra/db/DataRange.java
+++ b/src/java/org/apache/cassandra/db/DataRange.java
@@@ -124,12 -131,18 +132,17 @@@ public class DataRang
  
      public static class Paging extends DataRange
      {
+         // The slice of columns that we want to fetch for each row, ignoring 
page start/end issues.
          private final SliceQueryFilter sliceFilter;
 -
 -        private final Comparator<ByteBuffer> comparator;
 +        private final Comparator<Composite> comparator;
-         private final Composite columnStart;
-         private final Composite columnFinish;
  
-         private Paging(AbstractBounds<RowPosition> range, SliceQueryFilter 
filter, Composite columnStart, Composite columnFinish, Comparator<Composite> 
comparator)
+         // used to restrict the start of the slice for the first partition in 
the range
 -        private final ByteBuffer firstPartitionColumnStart;
++        private final Composite firstPartitionColumnStart;
+ 
+         // used to restrict the end of the slice for the last partition in 
the range
 -        private final ByteBuffer lastPartitionColumnFinish;
++        private final Composite lastPartitionColumnFinish;
+ 
 -        private Paging(AbstractBounds<RowPosition> range, SliceQueryFilter 
filter, ByteBuffer firstPartitionColumnStart, ByteBuffer 
lastPartitionColumnFinish, Comparator<ByteBuffer> comparator)
++        private Paging(AbstractBounds<RowPosition> range, SliceQueryFilter 
filter, Composite firstPartitionColumnStart, Composite 
lastPartitionColumnFinish, Comparator<Composite> comparator)
          {
              super(range, filter);
  
@@@ -139,13 -152,13 +152,13 @@@
  
              this.sliceFilter = filter;
              this.comparator = comparator;
-             this.columnStart = columnStart;
-             this.columnFinish = columnFinish;
+             this.firstPartitionColumnStart = firstPartitionColumnStart;
+             this.lastPartitionColumnFinish = lastPartitionColumnFinish;
          }
  
 -        public Paging(AbstractBounds<RowPosition> range, SliceQueryFilter 
filter, ByteBuffer columnStart, ByteBuffer columnFinish, AbstractType<?> 
comparator)
 +        public Paging(AbstractBounds<RowPosition> range, SliceQueryFilter 
filter, Composite columnStart, Composite columnFinish, CellNameType comparator)
          {
 -            this(range, filter, columnStart, columnFinish, 
filter.isReversed() ? comparator.reverseComparator : comparator);
 +            this(range, filter, columnStart, columnFinish, 
filter.isReversed() ? comparator.reverseComparator() : comparator);
          }
  
          @Override
@@@ -184,11 -197,12 +197,11 @@@
  
          private ColumnSlice[] slicesForKey(ByteBuffer key)
          {
--            // We don't call that until it's necessary, so assume we have to 
do some hard work
+             // Also note that firstPartitionColumnStart and 
lastPartitionColumnFinish, when used, only "restrict" the filter slices,
              // it doesn't expand on them. As such, we can ignore the case 
where they are empty and we do
              // as it screw up with the logic below (see #6592)
-             Composite newStart = equals(startKey(), key) && 
!columnStart.isEmpty() ? columnStart : null;
-             Composite newFinish = equals(stopKey(), key) && 
!columnFinish.isEmpty() ? columnFinish : null;
 -            ByteBuffer newStart = equals(startKey(), key) && 
firstPartitionColumnStart.hasRemaining() ? firstPartitionColumnStart : null;
 -            ByteBuffer newFinish = equals(stopKey(), key) && 
lastPartitionColumnFinish.hasRemaining() ? lastPartitionColumnFinish : null;
++            Composite newStart = equals(startKey(), key) && 
!firstPartitionColumnStart.isEmpty() ? firstPartitionColumnStart : null;
++            Composite newFinish = equals(stopKey(), key) && 
!lastPartitionColumnFinish.isEmpty() ? lastPartitionColumnFinish : null;
  
              List<ColumnSlice> newSlices = new 
ArrayList<ColumnSlice>(sliceFilter.slices.length); // in the common case, we'll 
have the same number of slices
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6fe6d65d/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
----------------------------------------------------------------------

Reply via email to