You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by aw...@apache.org on 2017/11/15 21:47:08 UTC
[40/50] cassandra git commit: Fix ISE thrown by
UPI.Serializer.hasNext() for some SELECT queries
Fix ISE thrown by UPI.Serializer.hasNext() for some SELECT queries
patch by Aleksey Yeschenko; reviewed by Sam Tunnicliffe for
CASSANDRA-13911
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/51ad68ec
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/51ad68ec
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/51ad68ec
Branch: refs/heads/master
Commit: 51ad68ec45c7a40de1c51b31651632f2e87ceaa4
Parents: f39b468
Author: Aleksey Yeschenko <al...@yeschenko.com>
Authored: Wed Sep 27 13:09:05 2017 +0100
Committer: Aleksey Yeschenko <al...@yeschenko.com>
Committed: Fri Sep 29 22:13:08 2017 +0100
----------------------------------------------------------------------
consistency_test.py | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/51ad68ec/consistency_test.py
----------------------------------------------------------------------
diff --git a/consistency_test.py b/consistency_test.py
index 407873c..b6ecff6 100644
--- a/consistency_test.py
+++ b/consistency_test.py
@@ -774,6 +774,55 @@ class TestAccuracy(TestHelper):
class TestConsistency(Tester):
@since('3.0')
+ def test_13911(self):
+ """
+ @jira_ticket CASSANDRA-13911
+ """
+ cluster = self.cluster
+
+ # disable hinted handoff and set batch commit log so this doesn't interfere with the test
+ cluster.set_configuration_options(values={'hinted_handoff_enabled': False})
+ cluster.set_batch_commitlog(enabled=True)
+
+ cluster.populate(2).start(wait_other_notice=True)
+ node1, node2 = cluster.nodelist()
+
+ session = self.patient_cql_connection(node1)
+
+ query = "CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 2};"
+ session.execute(query)
+
+ query = 'CREATE TABLE test.test (pk int, ck int, PRIMARY KEY (pk, ck));'
+ session.execute(query)
+
+ # with node2 down, insert row 0 on node1
+ #
+ # node1, partition 0 | 0
+ # node2, partition 0 |
+
+ node2.stop(wait_other_notice=True)
+ session.execute('INSERT INTO test.test (pk, ck) VALUES (0, 0);')
+ node2.start(wait_other_notice=True, wait_for_binary_proto=True)
+
+ # with node1 down, delete row 1 and 2 on node2
+ #
+ # node1, partition 0 | 0
+ # node2, partition 0 | x x
+
+ session = self.patient_cql_connection(node2)
+
+ node1.stop(wait_other_notice=True)
+ session.execute('DELETE FROM test.test WHERE pk = 0 AND ck IN (1, 2);')
+ node1.start(wait_other_notice=True, wait_for_binary_proto=True)
+
+ # with both nodes up, do a CL.ALL query with per partition limit of 1;
+ # prior to CASSANDRA-13911 this would trigger an IllegalStateException
+ assert_all(session,
+ 'SELECT DISTINCT pk FROM test.test;',
+ [[0]],
+ cl=ConsistencyLevel.ALL)
+
+ @since('3.0')
def test_13880(self):
"""
@jira_ticket CASSANDRA-13880
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org