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 2019/06/12 14:55:43 UTC

[cassandra-dtest] branch master updated (baeefb6 -> 7c228b0)

This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git.


    from baeefb6  Drop token_generator_test from 2.1 branch
     new d520f7e  remove redundant internode_messaging_test.py
     new 907313b  Fix snitch_test.py
     new 5372ed7  Simplify cql_test.py::TestCQLSlowQuery::test_remote_query
     new 7c228b0  Fix largecolumn_test.py

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 byteman/corrupt_internode_messages_gossip.btm | 17 ----------
 cql_test.py                                   | 19 +++--------
 internode_messaging_test.py                   | 48 ---------------------------
 largecolumn_test.py                           |  4 ++-
 snitch_test.py                                | 18 +++++++---
 5 files changed, 22 insertions(+), 84 deletions(-)
 delete mode 100644 byteman/corrupt_internode_messages_gossip.btm
 delete mode 100644 internode_messaging_test.py


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


[cassandra-dtest] 02/04: Fix snitch_test.py

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit 907313b90643dd933b5b6deb9e69984b5a911a89
Author: Aleksey Yeschenko <al...@apple.com>
AuthorDate: Tue Mar 19 18:24:10 2019 +0000

    Fix snitch_test.py
---
 snitch_test.py | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/snitch_test.py b/snitch_test.py
index 80cda7a..9bfa487 100644
--- a/snitch_test.py
+++ b/snitch_test.py
@@ -74,8 +74,13 @@ class TestGossipingPropertyFileSnitch(Tester):
                 snitch_file.write("prefer_local=true" + os.linesep)
 
         node1.start(wait_for_binary_proto=True)
-        node1.watch_log_for("Starting Messaging Service on {}:{}".format(NODE1_40_LISTEN_ADDRESS[:-5] if running40 else NODE1_LISTEN_FMT_ADDRESS, STORAGE_PORT), timeout=60)
-        node1.watch_log_for("Starting Messaging Service on {}:{}".format(NODE1_40_BROADCAST_ADDRESS[:-5] if running40 else NODE1_BROADCAST_FMT_ADDRESS, STORAGE_PORT), timeout=60)
+        if running40:
+            node1.watch_log_for("Listening on address: \({}:{}\)".format(NODE1_40_LISTEN_ADDRESS[:-5], STORAGE_PORT), timeout=60)
+            node1.watch_log_for("Listening on address: \({}:{}\)".format(NODE1_40_BROADCAST_ADDRESS[:-5], STORAGE_PORT), timeout=60)
+        else:
+            node1.watch_log_for("Starting Messaging Service on {}:{}".format(NODE1_LISTEN_FMT_ADDRESS, STORAGE_PORT), timeout=60)
+            node1.watch_log_for("Starting Messaging Service on {}:{}".format(NODE1_BROADCAST_FMT_ADDRESS, STORAGE_PORT), timeout=60)
+
         self._test_connect(NODE1_LISTEN_ADDRESS, STORAGE_PORT)
         self._test_connect(NODE1_BROADCAST_ADDRESS, STORAGE_PORT)
 
@@ -87,8 +92,13 @@ class TestGossipingPropertyFileSnitch(Tester):
         original_rows = list(session.execute("SELECT * FROM {}".format(stress_table)))
 
         node2.start(wait_for_binary_proto=True, wait_other_notice=False)
-        node2.watch_log_for("Starting Messaging Service on {}:{}".format(NODE2_40_LISTEN_ADDRESS[:-5] if running40 else NODE2_LISTEN_FMT_ADDRESS, STORAGE_PORT), timeout=60)
-        node2.watch_log_for("Starting Messaging Service on {}:{}".format(NODE2_40_BROADCAST_ADDRESS[:-5] if running40 else NODE2_BROADCAST_FMT_ADDRESS, STORAGE_PORT), timeout=60)
+        if running40:
+            node2.watch_log_for("Listening on address: \({}:{}\)".format(NODE2_40_LISTEN_ADDRESS[:-5], STORAGE_PORT), timeout=60)
+            node2.watch_log_for("Listening on address: \({}:{}\)".format(NODE2_40_BROADCAST_ADDRESS[:-5], STORAGE_PORT), timeout=60)
+        else:
+            node2.watch_log_for("Starting Messaging Service on {}:{}".format(NODE2_LISTEN_FMT_ADDRESS, STORAGE_PORT), timeout=60)
+            node2.watch_log_for("Starting Messaging Service on {}:{}".format(NODE2_BROADCAST_FMT_ADDRESS, STORAGE_PORT), timeout=60)
+
         self._test_connect(NODE2_LISTEN_ADDRESS, STORAGE_PORT)
         self._test_connect(NODE2_BROADCAST_ADDRESS, STORAGE_PORT)
 


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


[cassandra-dtest] 04/04: Fix largecolumn_test.py

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit 7c228b0a2a9bbbfb3f55e91e5b055a8a705e9abb
Author: Aleksey Yeschenko <al...@apple.com>
AuthorDate: Tue Apr 30 15:40:54 2019 +0100

    Fix largecolumn_test.py
---
 largecolumn_test.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/largecolumn_test.py b/largecolumn_test.py
index 261ab75..97bb013 100644
--- a/largecolumn_test.py
+++ b/largecolumn_test.py
@@ -45,7 +45,9 @@ class TestLargeColumn(Tester):
         cluster = self.cluster
         # Commit log segment size needs to increase for the database to be willing to accept columns that large
         # internode compression is disabled because the regression being tested occurs in NIO buffer pooling without compression
-        cluster.set_configuration_options({'commitlog_segment_size_in_mb': 128, 'internode_compression': 'none'})
+        cluster.set_configuration_options({'commitlog_segment_size_in_mb': 128,
+                                           'internode_compression': 'none',
+                                           'internode_max_message_size_in_bytes': 128 * 1024 * 1024})
         # Have Netty allocate memory on heap so it is clear if memory used for large columns is related to intracluster messaging
         cluster.populate(2).start(jvm_args=[" -Dcassandra.netty_use_heap_allocator=true "])
         node1, node2 = cluster.nodelist()


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


[cassandra-dtest] 03/04: Simplify cql_test.py::TestCQLSlowQuery::test_remote_query

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit 5372ed70e709d2599a35c4f82c9591ddcc7731f1
Author: Aleksey Yeschenko <al...@apple.com>
AuthorDate: Wed Mar 20 11:13:37 2019 +0000

    Simplify cql_test.py::TestCQLSlowQuery::test_remote_query
---
 cql_test.py | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/cql_test.py b/cql_test.py
index f49e627..0f49561 100644
--- a/cql_test.py
+++ b/cql_test.py
@@ -1138,32 +1138,23 @@ class TestCQLSlowQuery(CQLTester):
         session.execute(SimpleStatement("SELECT * from test2",
                                         consistency_level=ConsistencyLevel.ONE,
                                         retry_policy=FallthroughRetryPolicy()))
-
         node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2"],
                             from_mark=mark, filename='debug.log', timeout=60)
-        mark = node2.mark_log(filename='debug.log')
 
-        session.execute(SimpleStatement("SELECT * from test2 where id = 1",
-                                        consistency_level=ConsistencyLevel.ONE,
-                                        retry_policy=FallthroughRetryPolicy()))
 
-        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2"],
-                            from_mark=mark, filename='debug.log', timeout=60)
         mark = node2.mark_log(filename='debug.log')
-
         session.execute(SimpleStatement("SELECT * from test2 where id = 1",
                                         consistency_level=ConsistencyLevel.ONE,
                                         retry_policy=FallthroughRetryPolicy()))
-
-        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2"],
+        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2 WHERE id = 1"],
                             from_mark=mark, filename='debug.log', timeout=60)
-        mark = node2.mark_log(filename='debug.log')
 
-        session.execute(SimpleStatement("SELECT * from test2 where token(id) < 0",
+
+        mark = node2.mark_log(filename='debug.log')
+        session.execute(SimpleStatement("SELECT * from test2 where token(id) <= 0",
                                         consistency_level=ConsistencyLevel.ONE,
                                         retry_policy=FallthroughRetryPolicy()))
-
-        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2"],
+        node2.watch_log_for(["operations were slow", "SELECT \* FROM ks.test2 WHERE token\(id\) <= 0"],
                             from_mark=mark, filename='debug.log', timeout=60)
 
     def test_disable_slow_query_log(self):


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


[cassandra-dtest] 01/04: remove redundant internode_messaging_test.py

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aleksey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit d520f7edf02a39cfcc6a016eb4c80fc3e0e74dc1
Author: Benedict Elliott Smith <be...@apple.com>
AuthorDate: Mon Mar 18 18:14:15 2019 +0000

    remove redundant internode_messaging_test.py
---
 byteman/corrupt_internode_messages_gossip.btm | 17 ----------
 internode_messaging_test.py                   | 48 ---------------------------
 2 files changed, 65 deletions(-)

diff --git a/byteman/corrupt_internode_messages_gossip.btm b/byteman/corrupt_internode_messages_gossip.btm
deleted file mode 100644
index 66e4fe2..0000000
--- a/byteman/corrupt_internode_messages_gossip.btm
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# corrupt the first gossip ACK message. we corrupt it on the way out,
-# in serialize(), so it fails on deserializing. However, we also need
-# to hack the serializedSize().
-#
-
-RULE corrupt the first gossip ACK message
-CLASS org.apache.cassandra.gms.GossipDigestAckSerializer
-METHOD serialize(org.apache.cassandra.gms.GossipDigestAck, org.apache.cassandra.io.util.DataOutputPlus, int)
-AT ENTRY
-# set flag to only run this rule once.
-IF NOT flagged("done")
-DO
-   flag("done");
-   $2.writeInt(-1);
-ENDRULE
-
diff --git a/internode_messaging_test.py b/internode_messaging_test.py
deleted file mode 100644
index 3914210..0000000
--- a/internode_messaging_test.py
+++ /dev/null
@@ -1,48 +0,0 @@
-import pytest
-import logging
-import time
-
-from dtest import Tester
-
-since = pytest.mark.since
-logger = logging.getLogger(__name__)
-
-_LOG_ERR_ILLEGAL_CAPACITY = "Caused by: java.lang.IllegalArgumentException: Illegal Capacity: -1"
-
-
-@since('4.0')
-class TestInternodeMessaging(Tester):
-
-    @pytest.fixture(autouse=True)
-    def fixture_add_additional_log_patterns(self, fixture_dtest_setup):
-        fixture_dtest_setup.ignore_log_patterns = (
-            r'Illegal Capacity: -1',
-            r'reported message size'
-        )
-
-    def test_message_corruption(self):
-        """
-        @jira_ticket CASSANDRA-14574
-
-        Use byteman to corrupt an outgoing gossip ACK message, check that the recipient fails *once* on the message
-        but does not spin out of control trying to process the rest of the bytes in the buffer.
-        Then make sure normal messaging can occur after a reconnect (on a different socket, of course).
-        """
-        cluster = self.cluster
-        cluster.populate(2, install_byteman=True)
-        cluster.start(wait_other_notice=True)
-
-        node1, node2 = cluster.nodelist()
-        node1_log_mark = node1.mark_log()
-        node2_log_mark = node2.mark_log()
-
-        node2.byteman_submit(['./byteman/corrupt_internode_messages_gossip.btm'])
-
-        # wait for the deserialization error to happen on node1
-        time.sleep(10)
-        assert len(node1.grep_log(_LOG_ERR_ILLEGAL_CAPACITY, from_mark=node1_log_mark)) == 1
-
-        # now, make sure node2 reconnects (and continues gossiping).
-        # node.watch_log_for() will time out if it cannot find the log entry
-        assert node2.grep_log(r'successfully connected to 127.0.0.1:7000 \(GOSSIP\)',
-                              from_mark=node2_log_mark, filename='debug.log')


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