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 2016/07/18 15:43:37 UTC
[22/50] cassandra git commit: Merge branch 'cassandra-3.0' into
cassandra-3.9
Merge branch 'cassandra-3.0' into cassandra-3.9
* cassandra-3.0:
Don't ignore deletion info in sstable on reverse queries
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a006f577
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a006f577
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a006f577
Branch: refs/heads/cassandra-3.8
Commit: a006f577bdba7c4b248ef9f4cbd02a6c35a03162
Parents: 376dae2 76e68e9
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Jul 7 12:59:34 2016 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Jul 7 12:59:34 2016 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../columniterator/SSTableReversedIterator.java | 2 +-
.../cql3/validation/operations/DeleteTest.java | 26 ++++++++++++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a006f577/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d459e34,20ed6e0..1d11149
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,5 +1,8 @@@
-3.0.9
+3.9
+ * Fix SASI PREFIX search in CONTAINS mode with partial terms (CASSANDRA-12073)
+ * Increase size of flushExecutor thread pool (CASSANDRA-12071)
+Merged from 3.0:
+ * Fix reverse queries ignoring range tombstones (CASSANDRA-11733)
* Improve streaming synchronization and fault tolerance (CASSANDRA-11414)
* Avoid potential race when rebuilding CFMetaData (CASSANDRA-12098)
* Avoid missing sstables when getting the canonical sstables (CASSANDRA-11996)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a006f577/src/java/org/apache/cassandra/db/columniterator/SSTableReversedIterator.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/a006f577/test/unit/org/apache/cassandra/cql3/validation/operations/DeleteTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/cql3/validation/operations/DeleteTest.java
index 9ead942,814e822..9b92ebb
--- a/test/unit/org/apache/cassandra/cql3/validation/operations/DeleteTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/operations/DeleteTest.java
@@@ -1105,4 -1051,36 +1105,30 @@@ public class DeleteTest extends CQLTest
compact();
assertRows(execute("SELECT * FROM %s"), row(0, null));
}
+
- private void flush(boolean forceFlush)
- {
- if (forceFlush)
- flush();
- }
-
+ @Test
+ public void testDeleteAndReverseQueries() throws Throwable
+ {
+ // This test insert rows in one sstable and a range tombstone covering some of those rows in another, and it
+ // validates we correctly get only the non-removed rows when doing reverse queries.
+
+ createTable("CREATE TABLE %s (k text, i int, PRIMARY KEY (k, i))");
+
+ for (int i = 0; i < 10; i++)
+ execute("INSERT INTO %s(k, i) values (?, ?)", "a", i);
+
+ flush();
+
+ execute("DELETE FROM %s WHERE k = ? AND i >= ? AND i <= ?", "a", 2, 7);
+
+ assertRows(execute("SELECT i FROM %s WHERE k = ? ORDER BY i DESC", "a"),
+ row(9), row(8), row(1), row(0)
+ );
+
+ flush();
+
+ assertRows(execute("SELECT i FROM %s WHERE k = ? ORDER BY i DESC", "a"),
+ row(9), row(8), row(1), row(0)
+ );
+ }
}