Skip to content

Test test_throttling/test.py::test_remote_write_throttling_reload is flaky #86098

@Avogar

Description

@Avogar

https://play.clickhouse.com/play?user=play#CldJVEgKICAgICd0ZXN0X3JlbW90ZV93cml0ZV90aHJvdHRsaW5nX3JlbG9hZCcgQVMgbmFtZV9zdWJzdHIsCiAgICA5MCBBUyBpbnRlcnZhbF9kYXlzLAogICAgKCdTdGF0ZWxlc3MgdGVzdHMgKGFzYW4pJywgJ1N0YXRlbGVzcyB0ZXN0cyAoYWRkcmVzcyknLCAnU3RhdGVsZXNzIHRlc3RzIChhZGRyZXNzLCBhY3Rpb25zKScpIEFTIGJhY2twb3J0X2FuZF9yZWxlYXNlX3NwZWNpZmljX2NoZWNrcwpTRUxFQ1QKICAgIGNoZWNrX3N0YXJ0X3RpbWUgQVMgZCwKICAgIHB1bGxfcmVxdWVzdF9udW1iZXIgQVMgcHIsCiAgICByZXBvcnRfdXJsCkZST00gY2hlY2tzCldIRVJFICgobm93KCkgLSB0b0ludGVydmFsRGF5KGludGVydmFsX2RheXMpKSA8PSBjaGVja19zdGFydF90aW1lKSBBTkQgKHB1bGxfcmVxdWVzdF9udW1iZXIgTk9UIElOICgKICAgIFNFTEVDVCBwdWxsX3JlcXVlc3RfbnVtYmVyIEFTIHBybgogICAgRlJPTSBjaGVja3MKICAgIFdIRVJFIChwcm4gIT0gMCkgQU5EICgobm93KCkgLSB0b0ludGVydmFsRGF5KGludGVydmFsX2RheXMpKSA8PSBjaGVja19zdGFydF90aW1lKSBBTkQgKGNoZWNrX25hbWUgSU4gKGJhY2twb3J0X2FuZF9yZWxlYXNlX3NwZWNpZmljX2NoZWNrcykpCikpIEFORCAocG9zaXRpb24odGVzdF9uYW1lLCBuYW1lX3N1YnN0cikgPiAwKSBBTkQgKHRlc3Rfc3RhdHVzIElOICgnRkFJTCcsICdFUlJPUicsICdGTEFLWScpKQpPUkRFUiBCWSBkIERFU0MK

Example: https://s3.amazonaws.com/clickhouse-test-reports/PRs/74079/99cd120ce049e3740f0baaf6bb700b4dfcc568f6//integration_tests_amd_asan_old_analyzer_6_6/integration_run_parallel_0.log

_____________________ test_remote_write_throttling_reload ______________________
[gw1] linux -- Python 3.10.12 /usr/bin/python3

    def test_remote_write_throttling_reload():
        node.query(
            f"""
            drop table if exists data;
            create table data (key UInt64 CODEC(NONE)) engine=MergeTree() order by tuple() settings min_bytes_for_wide_part=1e9, storage_policy='s3';
            insert into data select * from numbers(1e6);
        """
        )
        # without bandwidth limit
        _, took = elapsed(node.query, f"insert into data select * from numbers(1e6)")
        assert_took(took, 0)
    
        # add bandwidth limit and reload config on fly
        node_update_config(
            "server", "max_remote_write_network_bandwidth_for_server", "2M", False
        )
        node.query("SYSTEM RELOAD CONFIG")
    
        # writing 1e6*8 bytes with 2M default bandwidth should take (8-2)/2=3 seconds
        _, took = elapsed(node.query, f"insert into data select * from numbers(1e6)")
        assert_took(took, 3)
    
        # update bandwidth back to 0
        node_update_config(
            "server", "max_remote_write_network_bandwidth_for_server", "0", False
        )
        node.query("SYSTEM RELOAD CONFIG")
    
        _, took = elapsed(node.query, f"insert into data select * from numbers(1e6)")
>       assert took < 1
E       assert 1.3175480365753174 < 1

test_throttling/test.py:524: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    flaky testflaky test found by CI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions