This is an automated email from the ASF dual-hosted git repository. jlewandowski pushed a commit to branch ds-trunk-5.0--2024-07-24 in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
commit c0802af0e8973f775b9e428446821b54957bc86a Author: Jacek Lewandowski <[email protected]> AuthorDate: Wed Jun 23 13:53:06 2021 +0200 STAR-247: Add allowed warning for running scrub test The message is expected since bloom filter is not recreated when there is no index. (cherry picked from commit f7684e4c78c9d0c669e9320b3313895079eba108) (cherry picked from commit 8ebfd4e2c3a3f793309400541e7c93960b99e889) (cherry picked from commit 4bb423636dd24390429d6faa06da6f34a4667712) (cherry picked from commit aac2b4d24abc39caffa2b35fe43ef3bdb68e012d) (cherry picked from commit 200a8daa6b5dab27ad3e49cb70dacad2a2981e86) (cherry picked from commit 5e861854bd8caa2b7bf106494ea220745934a6b7) (cherry picked from commit 3ecb300e4043dbdef16397c24babc0bdb4c74c15) --- scrub_test.py | 10 ++-- tools/assertions.py | 22 +++++---- ...247: Add allowed warning for running scrub test | 56 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 14 deletions(-) diff --git a/scrub_test.py b/scrub_test.py index 8633b511..077a1b0d 100644 --- a/scrub_test.py +++ b/scrub_test.py @@ -112,7 +112,7 @@ class TestHelper(Tester): if not common.is_win(): # nodetool always prints out on windows assert_length_equal(response, 0) # nodetool does not print anything unless there is an error - def launch_standalone_scrub(self, ks, cf, reinsert_overflowed_ttl=False, no_validate=False): + def launch_standalone_scrub(self, ks, cf, reinsert_overflowed_ttl=False, no_validate=False, acceptable_errors=None): """ Launch the standalone scrub """ @@ -136,7 +136,7 @@ class TestHelper(Tester): # if we have less than 64G free space, we get this warning - ignore it if err and "Consider adding more capacity" not in err.decode("utf-8"): logger.debug(err.decode("utf-8")) - assert_stderr_clean(err.decode("utf-8")) + assert_stderr_clean(err.decode("utf-8"), acceptable_errors) def perform_node_tool_cmd(self, cmd, table, indexes): """ @@ -163,12 +163,12 @@ class TestHelper(Tester): time.sleep(.1) return self.get_sstables(table, indexes) - def standalonescrub(self, table, *indexes): + def standalonescrub(self, table, *indexes, acceptable_errors=None): """ Launch standalone scrub on table and indexes, and then return all sstables in a dict keyed by the table or index name. """ - self.launch_standalone_scrub(KEYSPACE, table) + self.launch_standalone_scrub(ks=KEYSPACE, cf=table, acceptable_errors=acceptable_errors) for index in indexes: self.launch_standalone_scrub(KEYSPACE, '{}.{}'.format(table, index)) return self.get_sstables(table, indexes) @@ -478,7 +478,7 @@ class TestScrub(TestHelper): self.delete_non_essential_sstable_files('users') - scrubbed_sstables = self.standalonescrub('users') + scrubbed_sstables = self.standalonescrub(table='users', acceptable_errors=["WARN.*Could not recreate or deserialize existing bloom filter, continuing with a pass-through bloom filter but this will significantly impact reads performance"]) if should_assert_sstables: self.increase_sstable_generations(initial_sstables) diff --git a/tools/assertions.py b/tools/assertions.py index 80e18eae..2ed8a50e 100644 --- a/tools/assertions.py +++ b/tools/assertions.py @@ -293,16 +293,20 @@ def assert_stderr_clean(err, acceptable_errors=None): @param acceptable_errors A list that if used, the user chooses what messages are to be acceptable in stderr. """ + default_acceptable_errors = ["WARN.*JNA link failure.*unavailable.", + "objc.*Class JavaLaunchHelper.*?Which one is undefined.", + # Stress tool JMX connection failure, see CASSANDRA-12437 + "Failed to connect over JMX; not collecting these stats", + "Picked up JAVA_TOOL_OPTIONS:.*", + # Warnings for backward compatibility should be logged CASSANDRA-15234 + ".*parameters have been deprecated. They have new names and/or value format; " + + "For more information, please refer to NEWS.txt*", + ".*Error while computing token map for keyspace system_cluster_metadata with datacenter .*"] + if acceptable_errors is None: - acceptable_errors = ["WARN.*JNA link failure.*unavailable.", - "objc.*Class JavaLaunchHelper.*?Which one is undefined.", - # Stress tool JMX connection failure, see CASSANDRA-12437 - "Failed to connect over JMX; not collecting these stats", - "Picked up JAVA_TOOL_OPTIONS:.*", - # Warnings for backward compatibility should be logged CASSANDRA-15234 - ".*parameters have been deprecated. They have new names and/or value format; " - + "For more information, please refer to NEWS.txt*", - ".*Error while computing token map for keyspace system_cluster_metadata with datacenter .*"] + acceptable_errors = default_acceptable_errors + else: + acceptable_errors = default_acceptable_errors + acceptable_errors regex_str = r"^({}|\s*|\n)*$".format("|".join(acceptable_errors)) err_str = err.strip() diff --git a/update-history/STAR-1892/26-3ecb300e STAR-247: Add allowed warning for running scrub test b/update-history/STAR-1892/26-3ecb300e STAR-247: Add allowed warning for running scrub test new file mode 100644 index 00000000..ca7430f4 --- /dev/null +++ b/update-history/STAR-1892/26-3ecb300e STAR-247: Add allowed warning for running scrub test @@ -0,0 +1,56 @@ +--- a/tools/assertions.py ++++ b/tools/assertions.py +@@ -303,7 +303,7 @@ + + "For more information, please refer to NEWS.txt*"] + + if acceptable_errors is None: +-<<<<<<< ++<<<<<<< HEAD + acceptable_errors = ["WARN.*JNA link failure.*unavailable.", + "objc.*Class JavaLaunchHelper.*?Which one is undefined.", + # Stress tool JMX connection failure, see CASSANDRA-12437 +@@ -317,7 +317,7 @@ + acceptable_errors = default_acceptable_errors + else: + acceptable_errors = default_acceptable_errors + acceptable_errors +->>>>>>> ++>>>>>>> 3ecb300e (STAR-247: Add allowed warning for running scrub test) + + regex_str = r"^({}|\s*|\n)*$".format("|".join(acceptable_errors)) + err_str = err.strip() +diff --cc tools/assertions.py +index 80e18eae,40fda2c1..00000000 +--- a/tools/assertions.py ++++ b/tools/assertions.py +@@@ -293,16 -293,19 +293,31 @@@ def assert_stderr_clean(err, acceptable + @param acceptable_errors A list that if used, the user chooses what + messages are to be acceptable in stderr. + """ ++ default_acceptable_errors = ["WARN.*JNA link failure.*unavailable.", ++ "objc.*Class JavaLaunchHelper.*?Which one is undefined.", ++ # Stress tool JMX connection failure, see CASSANDRA-12437 ++ "Failed to connect over JMX; not collecting these stats", ++ "Picked up JAVA_TOOL_OPTIONS:.*", ++ # Warnings for backward compatibility should be logged CASSANDRA-15234 ++ ".*parameters have been deprecated. They have new names and/or value format; " ++ + "For more information, please refer to NEWS.txt*"] ++ + if acceptable_errors is None: +++<<<<<<< HEAD + + acceptable_errors = ["WARN.*JNA link failure.*unavailable.", + + "objc.*Class JavaLaunchHelper.*?Which one is undefined.", + + # Stress tool JMX connection failure, see CASSANDRA-12437 + + "Failed to connect over JMX; not collecting these stats", + + "Picked up JAVA_TOOL_OPTIONS:.*", + + # Warnings for backward compatibility should be logged CASSANDRA-15234 + + ".*parameters have been deprecated. They have new names and/or value format; " + + + "For more information, please refer to NEWS.txt*", + + ".*Error while computing token map for keyspace system_cluster_metadata with datacenter .*"] +++======= ++ acceptable_errors = default_acceptable_errors ++ else: ++ acceptable_errors = default_acceptable_errors + acceptable_errors +++>>>>>>> 3ecb300e (STAR-247: Add allowed warning for running scrub test) + + regex_str = r"^({}|\s*|\n)*$".format("|".join(acceptable_errors)) + err_str = err.strip() --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
