You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sam Tunnicliffe (Jira)" <ji...@apache.org> on 2020/06/09 12:35:00 UTC

[jira] [Updated] (CASSANDRA-15865) Flaky dtest hintedhandoff_test.py::TestHintedHandoffConfig::test_hintedhandoff_setmaxwindow

     [ https://issues.apache.org/jira/browse/CASSANDRA-15865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sam Tunnicliffe updated CASSANDRA-15865:
----------------------------------------
     Bug Category: Parent values: Correctness(12982)Level 1 values: Test Failure(12990)
       Complexity: Normal
      Component/s: Test/dtest
    Discovered By: Unit Test
    Fix Version/s: 4.0-alpha
         Severity: Normal
           Status: Open  (was: Triage Needed)

I haven't dug into it, but at first glance it looks like there could be a problem with the dtest:

{code:python}
        for node in node1, node2:
            res = self._launch_nodetool_cmd(node, 'statushandoff')
            assert 'Hinted handoff is running' == res.rstrip()

        res = self._launch_nodetool_cmd(node, 'getmaxhintwindow')
        assert 'Current max hint window: 300000 ms' == res.rstrip()
        self._do_hinted_handoff(node1, node2, True)
        node1.start(wait_other_notice=True)
        self._launch_nodetool_cmd(node, 'setmaxhintwindow 1')
        assert 'Current max hint window: 1 ms' == res.rstrip()
        self._do_hinted_handoff(node1, node2, False, keyspace='ks2')
{code}

The call to {{setmaxhintwindow}} to 1ms uses {{node}}, not {{node1}} which could be affected by the ordering of the output from {{nodetool statushandoff}}. {{_do_hinted_handoff}} writes to {{node1}} when {{node2}} is shutdown, so if the max window is set on {{node2}} by mistake, the test will fail as per the reported error:

{code}
self = <hintedhandoff_test.TestHintedHandoffConfig object at 0x7fd143d926a0>

    @since('4.0')
    def test_hintedhandoff_setmaxwindow(self):
        """
            Test global hinted handoff against max_hint_window_in_ms update via nodetool
            """
        node1, node2 = self._start_two_node_cluster({'hinted_handoff_enabled': True, "max_hint_window_in_ms": 300000})
    
        for node in node1, node2:
            res = self._launch_nodetool_cmd(node, 'statushandoff')
            assert 'Hinted handoff is running' == res.rstrip()
    
        res = self._launch_nodetool_cmd(node, 'getmaxhintwindow')
        assert 'Current max hint window: 300000 ms' == res.rstrip()
        self._do_hinted_handoff(node1, node2, True)
        node1.start(wait_other_notice=True)
        self._launch_nodetool_cmd(node, 'setmaxhintwindow 1')
        res = self._launch_nodetool_cmd(node, 'getmaxhintwindow')
        assert 'Current max hint window: 1 ms' == res.rstrip()
>       self._do_hinted_handoff(node1, node2, False, keyspace='ks2')

hintedhandoff_test.py:146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
hintedhandoff_test.py:76: in _do_hinted_handoff
    query_c1c2(session, n, ConsistencyLevel.ONE, tolerate_missing=True, must_be_missing=True)
tools/data.py:40: in query_c1c2
    assertions.assert_length_equal(rows, 0)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

object_with_length = [Row(c1='value1', c2='value2')], expected_length = 0

    def assert_length_equal(object_with_length, expected_length):
        """
        Assert an object has a specific length.
        @param object_with_length The object whose length will be checked
        @param expected_length The expected length of the object
    
        Examples:
        assert_length_equal(res, nb_counter)
        """
        assert len(object_with_length) == expected_length, \
            "Expected {} to have length {}, but instead is of length {}"\
>           .format(object_with_length, expected_length, len(object_with_length))
E       AssertionError: Expected [Row(c1='value1', c2='value2')] to have length 0, but instead is of length 1

tools/assertions.py:269: AssertionError
{code}

> Flaky dtest hintedhandoff_test.py::TestHintedHandoffConfig::test_hintedhandoff_setmaxwindow
> -------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15865
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15865
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest
>            Reporter: Sam Tunnicliffe
>            Priority: Normal
>             Fix For: 4.0-alpha
>
>
> I've seen this fail a couple of times under JDK11, when it doesn't appear to be related to the changes under test.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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