Skip to content

Refactor KeyCondition and key analysis#61459

Merged
KochetovNicolai merged 3 commits intoClickHouse:masterfrom
amosbird:trivial-count-opt-base
Jun 4, 2024
Merged

Refactor KeyCondition and key analysis#61459
KochetovNicolai merged 3 commits intoClickHouse:masterfrom
amosbird:trivial-count-opt-base

Conversation

@amosbird
Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Refactor KeyCondition and key analysis to improve PartitionPruner and trivial count optimization. This is separated from #60463 .

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Mar 15, 2024
@robot-clickhouse
Copy link
Copy Markdown
Member

robot-clickhouse commented Mar 15, 2024

This is an automated comment for commit ba7b4e0 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
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests❌ failure
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc❌ failure
Successful checks
Check nameDescriptionStatus
A SyncIf it fails, ask a maintainer for help✅ success
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help✅ success
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ success
ClickHouse build checkBuilds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The cmake options can be found in the build log, grepping for cmake. Use these options and follow the general build process✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ 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
Install packagesChecks that the built packages are installable in a clear environment✅ success
Mergeable CheckChecks if all other necessary checks are successful✅ success
PR CheckThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ 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

@amosbird amosbird force-pushed the trivial-count-opt-base branch 2 times, most recently from 8229d08 to b0fe7c2 Compare March 16, 2024 02:17
Comment thread src/Storages/MergeTree/BoolMask.h Outdated
Comment thread src/Storages/MergeTree/KeyCondition.cpp Outdated
Copy link
Copy Markdown
Member

@KochetovNicolai KochetovNicolai left a comment

Choose a reason for hiding this comment

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

Overall looks good.

@KochetovNicolai KochetovNicolai self-assigned this Jun 3, 2024
@amosbird amosbird force-pushed the trivial-count-opt-base branch from b0fe7c2 to ba7b4e0 Compare June 3, 2024 14:46
@amosbird
Copy link
Copy Markdown
Collaborator Author

amosbird commented Jun 4, 2024

prewhere_profile_events

Also observed as flaky in #64255, #61112

test_checking_s3_blobs_paranoid/test.py::test_query_is_canceled_with_inf_retries

S3 write failure.

E           helpers.client.QueryRuntimeException: Client failed! Return code: 243, stderr: Received exception from server (version 24.6.1):
E           Code: 499. DB::Exception: Received from 172.16.3.6:9000. DB::Exception: Poco::Exception. Code: 1000, e.code() = 111, Connection refused (version 24.6.1.2668). Stack trace:
E           
E           0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000bc2f768
E           1. DB::S3Exception::S3Exception(String const&, Aws::S3::S3Errors) @ 0x000000000e757374
E           2. void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<DB::WriteBufferFromS3::writePart(DB::WriteBufferFromS3::PartData&&)::$_0, void ()>>(std::__function::__policy_storage const*) @ 0x000000000e7f0424
E           3. void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<DB::TaskTracker::add(std::function<void ()>&&)::$_0, void ()>>(std::__function::__policy_storage const*) @ 0x000000000e7f47cc
E           4. std::__packaged_task_func<std::function<std::future<void> (std::function<void ()>&&, Priority)> DB::threadPoolCallbackRunnerUnsafe<void, std::function<void ()>>(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>&, String const&)::'lambda'(std::function<void ()>&&, Priority)::operator()(std::function<void ()>&&, Priority)::'lambda'(), std::allocator<std::function<std::future<void> (std::function<void ()>&&, Priority)> DB::threadPoolCallbackRunnerUnsafe<void, std::function<void ()>>(ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>&, String const&)::'lambda'(std::function<void ()>&&, Priority)::operator()(std::function<void ()>&&, Priority)::'lambda'()>, void ()>::operator()() @ 0x000000000e756254
E           5. std::packaged_task<void ()>::operator()() @ 0x000000000d5460b8
E           6. ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::worker(std::__list_iterator<ThreadFromGlobalPoolImpl<false, true>, void*>) @ 0x000000000bccb624
E           7. void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>(void&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x000000000bccf190
E           8. void* std::__thread_proxy[abi:v15000]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x000000000bccde40
E           9. ? @ 0x000000000007d5c8
E           10. ? @ 0x00000000000e5edc
E           . (S3_ERROR)
E           (query: KILL QUERY WHERE query_id = 'TEST_QUERY_IS_CANCELED_WITH_INF_RETRIES' ASYNC)

test_replicated_database/test.py::test_alter_attach[ReplicatedMergeTree]

Also observed flaky in #64694

@amosbird
Copy link
Copy Markdown
Collaborator Author

amosbird commented Jun 4, 2024

Stateless tests (coverage) somehow fails to run.

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

Labels

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.

4 participants