Skip to content

Commit 83f6018

Browse files
STAR-801: Add allowed warning for running scrub test
The message is expected since bloom filter is not recreated when there is no index.
1 parent 1b1c103 commit 83f6018

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

scrub_test.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def launch_nodetool_cmd(self, cmd):
110110
if not common.is_win(): # nodetool always prints out on windows
111111
assert_length_equal(response, 0) # nodetool does not print anything unless there is an error
112112

113-
def launch_standalone_scrub(self, ks, cf, reinsert_overflowed_ttl=False, no_validate=False):
113+
def launch_standalone_scrub(self, ks, cf, reinsert_overflowed_ttl=False, no_validate=False, acceptable_errors=None):
114114
"""
115115
Launch the standalone scrub
116116
"""
@@ -134,7 +134,7 @@ def launch_standalone_scrub(self, ks, cf, reinsert_overflowed_ttl=False, no_vali
134134
# if we have less than 64G free space, we get this warning - ignore it
135135
if err and "Consider adding more capacity" not in err.decode("utf-8"):
136136
logger.debug(err.decode("utf-8"))
137-
assert_stderr_clean(err.decode("utf-8"))
137+
assert_stderr_clean(err.decode("utf-8"), acceptable_errors)
138138

139139
def perform_node_tool_cmd(self, cmd, table, indexes):
140140
"""
@@ -161,12 +161,12 @@ def scrub(self, table, *indexes):
161161
time.sleep(.1)
162162
return self.get_sstables(table, indexes)
163163

164-
def standalonescrub(self, table, *indexes):
164+
def standalonescrub(self, table, *indexes, acceptable_errors=None):
165165
"""
166166
Launch standalone scrub on table and indexes, and then return all sstables
167167
in a dict keyed by the table or index name.
168168
"""
169-
self.launch_standalone_scrub(KEYSPACE, table)
169+
self.launch_standalone_scrub(ks=KEYSPACE, cf=table, acceptable_errors=acceptable_errors)
170170
for index in indexes:
171171
self.launch_standalone_scrub(KEYSPACE, '{}.{}'.format(table, index))
172172
return self.get_sstables(table, indexes)
@@ -446,7 +446,7 @@ def test_standalone_scrub_essential_files_only(self):
446446

447447
self.delete_non_essential_sstable_files('users')
448448

449-
scrubbed_sstables = self.standalonescrub('users')
449+
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"])
450450
self.increase_sstable_generations(initial_sstables)
451451
assert initial_sstables == scrubbed_sstables
452452

tools/assertions.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,16 @@ def assert_stderr_clean(err, acceptable_errors=None):
293293
@param acceptable_errors A list that if used, the user chooses what
294294
messages are to be acceptable in stderr.
295295
"""
296+
default_acceptable_errors = ["WARN.*JNA link failure.*unavailable.",
297+
"objc.*Class JavaLaunchHelper.*?Which one is undefined.",
298+
# Stress tool JMX connection failure, see CASSANDRA-12437
299+
"Failed to connect over JMX; not collecting these stats",
300+
"Picked up JAVA_TOOL_OPTIONS:.*"]
301+
296302
if acceptable_errors is None:
297-
acceptable_errors = ["WARN.*JNA link failure.*unavailable.",
298-
"objc.*Class JavaLaunchHelper.*?Which one is undefined.",
299-
# Stress tool JMX connection failure, see CASSANDRA-12437
300-
"Failed to connect over JMX; not collecting these stats",
301-
"Picked up JAVA_TOOL_OPTIONS:.*"]
303+
acceptable_errors = default_acceptable_errors
304+
else:
305+
acceptable_errors = default_acceptable_errors + acceptable_errors
302306

303307
regex_str = r"^({}|\s*|\n)*$".format("|".join(acceptable_errors))
304308
err_str = err.strip()

0 commit comments

Comments
 (0)