Repository: cassandra
Updated Branches:
refs/heads/trunk dec76593f -> 841e48546
Fix SELECT DISTINCT queries between 2.2.2 nodes and 3.0 nodes
patch by Benjamin Lerer; reviewed by Aleksey Yeschenko for CASSANDRA-10473
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5d6455f2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5d6455f2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5d6455f2
Branch: refs/heads/trunk
Commit: 5d6455f29c7919d6b08667755f90428984524a22
Parents: bc89bc6
Author: blerer <benjamin.lerer@datastax.com>
Authored: Fri Oct 16 21:36:45 2015 +0200
Committer: blerer <benjamin.lerer@datastax.com>
Committed: Fri Oct 16 21:40:24 2015 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
NEWS.txt | 2 +-
src/java/org/apache/cassandra/db/ReadCommand.java | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d6455f2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cb4c2d8..33c360e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.0-rc2
+ * Fix SELECT DISTINCT queries between 2.2.2 nodes and 3.0 nodes (CASSANDRA-10473)
* Remove circular references in SegmentedFile (CASSANDRA-10543)
* Ensure validation of indexed values only occurs once per-partition (CASSANDRA-10536)
* Fix handling of static columns for range tombstones in thrift (CASSANDRA-10174)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d6455f2/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 48a0733..e8f86b7 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -46,7 +46,7 @@ New features
Upgrading
---------
- Upgrade to 3.0 is supported from Cassandra 2.1 versions greater or equal to 2.1.9,
- or Cassandra 2.2 versions greater or equal to 2.2.1. Upgrade from Cassandra 2.0 and
+ or Cassandra 2.2 versions greater or equal to 2.2.2. Upgrade from Cassandra 2.0 and
older versions is not supported.
- The 'memtable_allocation_type: offheap_objects' option has been removed. It should
be re-introduced in a future release and you can follow CASSANDRA-9472 to know more.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/5d6455f2/src/java/org/apache/cassandra/db/ReadCommand.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java b/src/java/org/apache/cassandra/db/ReadCommand.java
index 91227cf..f29a009 100644
--- a/src/java/org/apache/cassandra/db/ReadCommand.java
+++ b/src/java/org/apache/cassandra/db/ReadCommand.java
@@ -1060,7 +1060,7 @@ public abstract class ReadCommand implements ReadQuery
// is what 3.0 does.
DataRange dataRange = new DataRange(keyRange, filter);
Slices slices = filter.requestedSlices();
- if (startBound != LegacyLayout.LegacyBound.BOTTOM && !startBound.bound.equals(slices.get(0).start()))
+ if (!isDistinct && startBound != LegacyLayout.LegacyBound.BOTTOM &&
!startBound.bound.equals(slices.get(0).start()))
{
// pre-3.0 nodes normally expect pages to include the last cell from the
previous page, but they handle it
// missing without any problems, so we can safely always set "inclusive"
to false in the data range
|