Skip to content

Make 01086_window_view_cleanup more stable#72232

Merged
nikitamikhaylov merged 3 commits intoClickHouse:masterfrom
ilejn:more_stable_wv_test
Dec 18, 2024
Merged

Make 01086_window_view_cleanup more stable#72232
nikitamikhaylov merged 3 commits intoClickHouse:masterfrom
ilejn:more_stable_wv_test

Conversation

@ilejn
Copy link
Copy Markdown
Contributor

@ilejn ilejn commented Nov 21, 2024

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Makes 01086_window_view_cleanup more stable/less flaky.

@ilejn
Copy link
Copy Markdown
Contributor Author

ilejn commented Nov 21, 2024

Appeared in #72123

I failed to properly reproduce the issue, while as far as I understand

  • the test is based on an assumption that cleaner (wake ups every second) would be fired during 2 seconds interval.
  • this is not always true in busy environments.
  • if cleanup did not happen before last insert, StorageWindowView::getCleanupBound exits upon max_fired_watermark == 0 condition, therefore clean up does not do anything, therefore loop
while true; do
	$CLICKHOUSE_CLIENT "${opts[@]}" --query="SELECT count(*) FROM ${DATABASE_ORDINARY}.\`.inner.wv\`" | grep -q "3" && break || sleep .5 ||:
done

is infinite (there are 6 rows in .inner.wv), therefore the test timeouts.

@ilejn
Copy link
Copy Markdown
Contributor Author

ilejn commented Nov 21, 2024

Hello @Vxider , since you are an author of the whole feature and of the particular test, could you have a look, please.

@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Dec 16, 2024
@robot-ch-test-poll1
Copy link
Copy Markdown
Contributor

robot-ch-test-poll1 commented Dec 16, 2024

This is an automated comment for commit aa31acb with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Check nameDescriptionStatus
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors❌ failure
Successful checks
Check nameDescriptionStatus
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Docs checkBuilds and tests the documentation✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integration tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success

@ilejn
Copy link
Copy Markdown
Contributor Author

ilejn commented Dec 17, 2024

Hello @nikitamikhaylov , should I do anything further?

$CLICKHOUSE_CLIENT "${opts[@]}" --query="SELECT count(*) FROM ${DATABASE_ORDINARY}.\`.inner.wv\`" | grep -q "5" && break || sleep .5 ||:
done

$CLICKHOUSE_CLIENT "${opts[@]}" --query="SELECT sleep(2);"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI we don't appreciate tests that rely heavily on sleeps.

@nikitamikhaylov nikitamikhaylov added this pull request to the merge queue Dec 18, 2024
Merged via the queue into ClickHouse:master with commit fdd6364 Dec 18, 2024
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants