cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [4/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Date Thu, 07 Dec 2017 22:13:12 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/b637eb11
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b637eb11
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b637eb11

Branch: refs/heads/trunk
Commit: b637eb11c956698dc2ffb936eb85224e22dc7d94
Parents: cdcd652 a9225f9
Author: Paulo Motta <paulo@apache.org>
Authored: Fri Dec 8 09:03:53 2017 +1100
Committer: Paulo Motta <paulo@apache.org>
Committed: Fri Dec 8 09:04:56 2017 +1100

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../io/sstable/format/SSTableReader.java        |  3 ++-
 .../apache/cassandra/cql3/SimpleQueryTest.java  | 20 ++++++++++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 691b285,a5a97db..18a22bd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,14 @@@
 +3.11.2
 + * Remove OpenJDK log warning (CASSANDRA-13916)
 + * Prevent compaction strategies from looping indefinitely (CASSANDRA-14079)
 + * Cache disk boundaries (CASSANDRA-13215)
 + * Add asm jar to build.xml for maven builds (CASSANDRA-11193)
 + * Round buffer size to powers of 2 for the chunk cache (CASSANDRA-13897)
 + * Update jackson JSON jars (CASSANDRA-13949)
 + * Avoid locks when checking LCS fanout and if we should defrag (CASSANDRA-13930)
 +Merged from 3.0:
  3.0.16
+  * Fix SStable ordering by max timestamp in SinglePartitionReadCommand (CASSANDRA-14010)
   * Accept role names containing forward-slash (CASSANDRA-14088)
   * Optimize CRC check chance probability calculations (CASSANDRA-14094)
   * Fix cleanup on keyspace with no replicas (CASSANDRA-13526)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b637eb11/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
index c2de52a,f32bcc6..62fe5a1
--- a/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
+++ b/test/unit/org/apache/cassandra/cql3/SimpleQueryTest.java
@@@ -547,42 -527,23 +547,62 @@@ public class SimpleQueryTest extends CQ
          );
      }
  
 +    /** Test for Cassandra issue 10958 **/
 +    @Test
 +    public void restrictionOnRegularColumnWithStaticColumnPresentTest() throws Throwable
 +    {
 +        createTable("CREATE TABLE %s (id int, id2 int, age int static, extra int, PRIMARY
KEY(id, id2))");
 +
 +        execute("INSERT INTO %s (id, id2, age, extra) VALUES (?, ?, ?, ?)", 1, 1, 1, 1);
 +        execute("INSERT INTO %s (id, id2, age, extra) VALUES (?, ?, ?, ?)", 2, 2, 2, 2);
 +        execute("UPDATE %s SET age=? WHERE id=?", 3, 3);
 +
 +        assertRows(execute("SELECT * FROM %s"),
 +            row(1, 1, 1, 1),
 +            row(2, 2, 2, 2),
 +            row(3, null, 3, null)
 +        );
 +
 +        assertRows(execute("SELECT * FROM %s WHERE extra > 1 ALLOW FILTERING"),
 +            row(2, 2, 2, 2)
 +        );
 +    }
 +
 +    @Test
 +    public void testRowFilteringOnStaticColumn() throws Throwable
 +    {
 +        createTable("CREATE TABLE %s (id int, name text, age int static, PRIMARY KEY (id,
name))");
 +        for (int i = 0; i < 5; i++)
 +        {
 +            execute("INSERT INTO %s (id, name, age) VALUES (?, ?, ?)", i, "NameDoesNotMatter",
i);
 +        }
 +
 +        assertInvalid("SELECT id, age FROM %s WHERE age < 1");
 +        assertRows(execute("SELECT id, age FROM %s WHERE age < 1 ALLOW FILTERING"),
 +                   row(0, 0));
 +        assertRows(execute("SELECT id, age FROM %s WHERE age > 0 AND age < 3 ALLOW
FILTERING"),
 +                   row(1, 1), row(2, 2));
 +        assertRows(execute("SELECT id, age FROM %s WHERE age > 3 ALLOW FILTERING"),
 +                   row(4, 4));
 +    }
++
+     @Test
+     public void testSStableTimestampOrdering() throws Throwable
+     {
+         createTable("CREATE TABLE %s (k1 int, v1 int, v2 int, PRIMARY KEY (k1))");
+         disableCompaction();
+ 
+         // sstable1
+         execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,1)  USING TIMESTAMP 5");
+         flush();
+ 
+         // sstable2
+         execute("INSERT INTO %s(k1,v1,v2) VALUES(1,1,2)  USING TIMESTAMP 8");
+         flush();
+ 
+         execute("INSERT INTO %s(k1) VALUES(1)  USING TIMESTAMP 7");
+         execute("DELETE FROM %s USING TIMESTAMP 6 WHERE k1 = 1");
+ 
+         assertRows(execute("SELECT * FROM %s WHERE k1=1"), row(1, 1, 2));
+     } 
  }


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


Mime
View raw message