You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/06/16 16:16:44 UTC

[GitHub] [cassandra-dtest] adelapena opened a new pull request #77: Add tests for CASSANDRA-15459

adelapena opened a new pull request #77:
URL: https://github.com/apache/cassandra-dtest/pull/77


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cassandra-dtest] adelapena commented on a change in pull request #77: Add tests for CASSANDRA-15459

Posted by GitBox <gi...@apache.org>.
adelapena commented on a change in pull request #77:
URL: https://github.com/apache/cassandra-dtest/pull/77#discussion_r465748489



##########
File path: consistency_test.py
##########
@@ -1571,6 +1571,78 @@ def test_quorum_available_during_failure(self):
         for n in range(100):
             query_c1c2(session, n, cl)
 
+    @since('3.11')
+    def test_group_by_srp(self):
+        """
+        Test GROUP BY with short read protection, particularly when there is a limit.
+        @jira_ticket CASSANDRA-15459
+        """
+        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)
+
+        # We want to disable read repair so it doesn't interfere with the test. On 4.0 we can just disable it on table
+        # creation, but if we are before 4.0 we'll have to use byteman to disable it.
+        use_byteman = self.dtest_config.cassandra_version_from_build < '4.0'
+
+        cluster.populate(2, install_byteman=use_byteman).start(wait_other_notice=True)
+        node1, node2 = cluster.nodelist()
+
+        session = self.patient_cql_connection(node1)
+
+        query = "CREATE KEYSPACE test WITH replication = {'class':'SimpleStrategy', 'replication_factor':2}"
+        session.execute(query)
+
+        query = "CREATE TABLE test.test (pk int, ck int, PRIMARY KEY (pk, ck))"
+        if not use_byteman:
+            query += " WITH READ_REPAIR='NONE'"
+        session.execute(query)
+
+        # with node2 down, populate data on node1
+        # node1:
+        #   key 1 : 1
+        #   key 0 : x
+        #   key 2 : 2
+
+        node2.stop()

Review comment:
       Right, I have added an in-JVM dtest. We can take back this PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cassandra-dtest] adelapena commented on pull request #77: Add tests for CASSANDRA-15459

Posted by GitBox <gi...@apache.org>.
adelapena commented on pull request #77:
URL: https://github.com/apache/cassandra-dtest/pull/77#issuecomment-669879349


   Closing without merging because the tests have been done in-JVM


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cassandra-dtest] maedhroz commented on a change in pull request #77: Add tests for CASSANDRA-15459

Posted by GitBox <gi...@apache.org>.
maedhroz commented on a change in pull request #77:
URL: https://github.com/apache/cassandra-dtest/pull/77#discussion_r465248098



##########
File path: consistency_test.py
##########
@@ -1571,6 +1571,78 @@ def test_quorum_available_during_failure(self):
         for n in range(100):
             query_c1c2(session, n, cl)
 
+    @since('3.11')
+    def test_group_by_srp(self):
+        """
+        Test GROUP BY with short read protection, particularly when there is a limit.
+        @jira_ticket CASSANDRA-15459
+        """
+        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)
+
+        # We want to disable read repair so it doesn't interfere with the test. On 4.0 we can just disable it on table
+        # creation, but if we are before 4.0 we'll have to use byteman to disable it.
+        use_byteman = self.dtest_config.cassandra_version_from_build < '4.0'
+
+        cluster.populate(2, install_byteman=use_byteman).start(wait_other_notice=True)
+        node1, node2 = cluster.nodelist()
+
+        session = self.patient_cql_connection(node1)
+
+        query = "CREATE KEYSPACE test WITH replication = {'class':'SimpleStrategy', 'replication_factor':2}"
+        session.execute(query)
+
+        query = "CREATE TABLE test.test (pk int, ck int, PRIMARY KEY (pk, ck))"
+        if not use_byteman:
+            query += " WITH READ_REPAIR='NONE'"
+        session.execute(query)
+
+        # with node2 down, populate data on node1
+        # node1:
+        #   key 1 : 1
+        #   key 0 : x
+        #   key 2 : 2
+
+        node2.stop()

Review comment:
       @adelapena This is the sort of thing where we might be able to get real performance advantages in an in-JVM dtest, where we can just call `executeInternal()` rather than stopping a node.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cassandra-dtest] adelapena closed pull request #77: Add tests for CASSANDRA-15459

Posted by GitBox <gi...@apache.org>.
adelapena closed pull request #77:
URL: https://github.com/apache/cassandra-dtest/pull/77


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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