[ https://issues.apache.org/jira/browse/CASSANDRA-19067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17790556#comment-17790556 ]
Sam Tunnicliffe edited comment on CASSANDRA-19067 at 11/28/23 1:09 PM: ----------------------------------------------------------------------- The test searches the replacement node log for messages matching the pattern: {code:java} replmnt_address = self.replacement_node.address_for_current_version_slashy() repled_address = self.replaced_node.address_for_current_version_slashy() token_ownership_log = r"Token (.*?) changing ownership from {} to {}".format(repled_address, replmnt_address) {code} The logs from the test run on circle show that this was logged as expected: {code:java} WARN [OptionalTasks:1] 2023-11-23 21:18:56,535 LegacyStateListener.java:146 - Token 3074457345618258602 changing ownership from /127.0.0.3:7000 to /127.0.0.4:7000 {code} but it appears as though it now may appear slightly later after node startup than previously. I suspect this makes the test slightly flaky as the message may not have appeared before the grep is performed. I have a dtest patch to make this more predictable and will attach soon. was (Author: beobal): The test searches the replacement node log for messages matching the pattern: {code:java} replmnt_address = self.replacement_node.address_for_current_version_slashy() repled_address = self.replaced_node.address_for_current_version_slashy() token_ownership_log = r"Token (.*?) changing ownership from {} to {}".format(repled_address, replmnt_address){code} The logs from the test run on circle show that this was logged as expected: {code:java} WARN [OptionalTasks:1] 2023-11-23 21:18:56,535 LegacyStateListener.java:146 - Token 3074457345618258602 changing ownership from /127.0.0.3:7000 to /127.0.0.4:7000 {code} but it appears as though it now may appear slightly later after node startup than previously. I suspect this makes the test slightly flaky as the message may not have appeared before the grep is performed. I have a dtest patch to make this more predictable and will attach soon. > Test failure: j11_dtests_large.replace_address_test.TestReplaceAddress > ---------------------------------------------------------------------- > > Key: CASSANDRA-19067 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19067 > Project: Cassandra > Issue Type: Bug > Components: Test/dtest/java > Reporter: Alex Petrov > Assignee: Sam Tunnicliffe > Priority: Normal > Fix For: 5.1-alpha1 > > > CircleCI failure: > https://app.circleci.com/pipelines/github/michaelsembwever/cassandra/256/workflows/c4fda8f1-a8d6-4523-be83-5e30b9de39fe/jobs/20466/tests > {code} > assert 0 == 1 > + where 0 = len(set()) > self = <replace_address_test.TestReplaceAddress object at 0x7f390285a8d0> > @pytest.mark.resource_intensive > def test_replace_first_boot(self): > > self._test_replace_node(jvm_option='replace_address_first_boot') > replace_address_test.py:281: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > replace_address_test.py:300: in _test_replace_node > previous_log_size = self._verify_tokens_migrated_successfully() > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > self = <replace_address_test.TestReplaceAddress object at 0x7f390285a8d0> > previous_log_size = None > def _verify_tokens_migrated_successfully(self, previous_log_size=None): > if not self.dtest_config.use_vnodes: > num_tokens = 1 > else: > # a little hacky but grep_log returns the whole line... > num_tokens = > int(self.replacement_node.get_conf_option('num_tokens')) > > logger.debug("Verifying {} tokens migrated > successfully".format(num_tokens)) > replmnt_address = > self.replacement_node.address_for_current_version_slashy() > repled_address = > self.replaced_node.address_for_current_version_slashy() > token_ownership_log = r"Token (.*?) changing ownership from {} to > {}".format(repled_address, > > replmnt_address) > logs = self.replacement_node.grep_log(token_ownership_log) > > if (previous_log_size is not None): > assert len(logs) == previous_log_size > > moved_tokens = set([l[1].group(1) for l in logs]) > logger.debug("number of moved tokens: {}".format(len(moved_tokens))) > > assert len(moved_tokens) == num_tokens > E assert 0 == 1 > E + where 0 = len(set()) > replace_address_test.py:207: AssertionError > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org