Skip to content

Rework loading and removing of data parts for MergeTree tables.#49474

Merged
nikitamikhaylov merged 25 commits intomasterfrom
rework-part-loading-and-deletion
Jun 6, 2023
Merged

Rework loading and removing of data parts for MergeTree tables.#49474
nikitamikhaylov merged 25 commits intomasterfrom
rework-part-loading-and-deletion

Conversation

@nikitamikhaylov
Copy link
Copy Markdown
Member

@nikitamikhaylov nikitamikhaylov commented May 3, 2023

Changelog category (leave one):

  • Improvement

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

Data parts loading and deletion jobs were moved to shared server-wide pools instead of per-table pools. Pools sizes are controlled via settings max_active_parts_loading_thread_pool_size, max_outdated_parts_loading_thread_pool_size and max_parts_cleaning_thread_pool_size in top-level config. Table-level settings max_part_loading_threads and max_part_removal_threads became obsolete.

@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-improvement Pull request with some product improvements label May 3, 2023
@robot-ch-test-poll3
Copy link
Copy Markdown
Contributor

robot-ch-test-poll3 commented May 3, 2023

This is an automated comment for commit 4b91c43 with description of existing statuses. It's updated for the latest CI running
The full report is available here
The overall status of the commit is 🔴 failure

Check nameDescriptionStatus
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
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 image for serversThe check to build and optionally push the mentioned image to docker hub🟢 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. Integrational 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🔴 failure
Install packagesChecks that the built packages are installable in a clear environment🟢 success
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests🟢 success
Mergeable CheckChecks if all other necessary checks are successful🟢 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
Push to DockerhubThe check for building and pushing the CI related docker images to docker hub🟢 success
SQLancerFuzzing tests that detect logical bugs with SQLancer tool🟢 success
SqllogicRun clickhouse on the sqllogic test set against sqlite and checks that all statements are passed🟢 success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc🟢 success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc🔴 failure
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

@nikitamikhaylov nikitamikhaylov marked this pull request as ready for review May 3, 2023 21:47
@nikitamikhaylov nikitamikhaylov changed the title Rework loading of Active data parts Rework loading and removing of data parts for MergeTree tables. May 3, 2023
@tavplubix tavplubix self-assigned this May 4, 2023
@tavplubix tavplubix assigned serxa and unassigned tavplubix May 5, 2023
@nikitamikhaylov nikitamikhaylov force-pushed the rework-part-loading-and-deletion branch from e516c9c to 8c73d4b Compare May 11, 2023 15:14
@nikitamikhaylov nikitamikhaylov force-pushed the rework-part-loading-and-deletion branch from 1e863a2 to a1fe647 Compare May 15, 2023 11:50
@nikitamikhaylov
Copy link
Copy Markdown
Member Author

AST Fuzzer (asan) - #50451

@nikitamikhaylov
Copy link
Copy Markdown
Member Author

nikitamikhaylov commented Jun 6, 2023

2023-06-06 00:34:33 02432_s3_parallel_parts_cleanup:                                        [ FAIL ] 121.67 sec. - Test runs too long (> 60s). Make it faster.
2023-06-06 00:34:33 Settings used in the test: --max_insert_threads=2 --group_by_two_level_threshold=801119 --group_by_two_level_threshold_bytes=34396403 --distributed_aggregation_memory_efficient=0 --fsync_metadata=0 --output_format_parallel_formatting=1 --input_format_parallel_parsing=0 --min_chunk_bytes_for_parallel_parsing=6975550 --max_read_buffer_size=556611 --prefer_localhost_replica=0 --max_block_size=62163 --max_threads=5 --optimize_or_like_chain=0 --optimize_read_in_order=1 --enable_multiple_prewhere_read_steps=0 --read_in_order_two_level_merge_threshold=53 --optimize_aggregation_in_order=0 --aggregation_in_order_max_block_bytes=10083882 --min_compress_block_size=1309370 --max_compress_block_size=1823644 --use_uncompressed_cache=0 --min_bytes_to_use_direct_io=10737418240 --min_bytes_to_use_mmap_io=10737418240 --local_filesystem_read_method=io_uring --remote_filesystem_read_method=threadpool --local_filesystem_read_prefetch=0 --remote_filesystem_read_prefetch=1 --allow_prefetched_read_pool_for_remote_filesystem=1 --filesystem_prefetch_max_memory_usage=128Mi --filesystem_prefetches_limit=0 --filesystem_prefetch_min_bytes_for_single_read_task=8Mi --filesystem_prefetch_step_marks=0 --filesystem_prefetch_step_bytes=0 --compile_expressions=0 --compile_aggregate_expressions=1 --compile_sort_description=0 --merge_tree_coarse_index_granularity=12 --optimize_distinct_in_order=1 --optimize_sorting_by_input_stream_properties=0 --http_response_buffer_size=5324882 --http_wait_end_of_query=False --enable_memory_bound_merging_of_aggregation_results=1
2023-06-06 00:34:33 
2023-06-06 00:34:33 MergeTree settings used in test: --ratio_of_defaults_for_sparse_serialization=0.26308820183312376 --prefer_fetch_merged_part_size_threshold=3695975838 --vertical_merge_algorithm_min_rows_to_activate=1 --vertical_merge_algorithm_min_columns_to_activate=100 --allow_vertical_merges_from_compact_to_wide_parts=1 --min_merge_bytes_to_use_direct_io=7512750631 --index_granularity_bytes=12630205 --merge_max_block_size=16666 --index_granularity=28529 --min_bytes_for_wide_part=0 --marks_compress_block_size=40960 --primary_key_compress_block_size=71152

It runs too long, not sure what to do with it.

2023-06-06 00:13:48 02432_s3_parallel_parts_cleanup:                                        [ OK ] 107.10 sec.
2023-06-06 00:14:05 00988_parallel_parts_removal:                                           [ OK ] 53.29 sec.
2023-06-06 00:14:24 00988_parallel_parts_removal:                                           [ OK ] 57.02 sec.
2023-06-06 00:14:26 01810_max_part_removal_threads_long:                                    [ OK ] 45.06 sec.
2023-06-06 00:14:28 02432_s3_parallel_parts_cleanup:                                        [ OK ] 112.35 sec.
2023-06-06 00:14:35 01810_max_part_removal_threads_long:                                    [ OK ] 46.43 sec.
2023-06-06 00:14:41 00988_parallel_parts_removal:                                           [ OK ] 64.73 sec.
2023-06-06 00:14:43 00988_parallel_parts_removal:                                           [ OK ] 62.00 sec.
2023-06-06 00:15:16 01810_max_part_removal_threads_long:                                    [ OK ] 48.01 sec.
2023-06-06 00:15:21 02432_s3_parallel_parts_cleanup:                                        [ OK ] 101.17 sec.
2023-06-06 00:15:24 00988_parallel_parts_removal:                                           [ OK ] 57.85 sec.
2023-06-06 00:15:25 00988_parallel_parts_removal:                                           [ OK ] 60.51 sec.
2023-06-06 00:15:30 01810_max_part_removal_threads_long:                                    [ OK ] 46.25 sec.
2023-06-06 00:15:39 00988_parallel_parts_removal:                                           [ OK ] 58.03 sec.
2023-06-06 00:15:59 02432_s3_parallel_parts_cleanup:                                        [ OK ] 113.85 sec.
2023-06-06 00:16:18 00988_parallel_parts_removal:                                           [ OK ] 61.89 sec.
2023-06-06 00:16:19 02432_s3_parallel_parts_cleanup:                                        [ OK ] 104.18 sec.
2023-06-06 00:16:19 00988_parallel_parts_removal:                                           [ OK ] 58.78 sec.
2023-06-06 00:16:21 01810_max_part_removal_threads_long:                                    [ OK ] 51.65 sec.
2023-06-06 00:16:28 01810_max_part_removal_threads_long:                                    [ OK ] 49.64 sec.
2023-06-06 00:16:50 01810_max_part_removal_threads_long:                                    [ OK ] 50.86 sec.
2023-06-06 00:17:06 02432_s3_parallel_parts_cleanup:                                        [ OK ] 101.97 sec.
2023-06-06 00:17:17 00988_parallel_parts_removal:                                           [ OK ] 57.11 sec.
2023-06-06 00:17:18 01810_max_part_removal_threads_long:                                    [ OK ] 58.66 sec.
2023-06-06 00:17:18 02432_s3_parallel_parts_cleanup:                                        [ OK ] 113.15 sec.
2023-06-06 00:17:20 01810_max_part_removal_threads_long:                                    [ OK ] 58.61 sec.
2023-06-06 00:17:46 02432_s3_parallel_parts_cleanup:                                        [ OK ] 77.54 sec.
2023-06-06 00:18:05 00988_parallel_parts_removal:                                           [ OK ] 58.67 sec.
2023-06-06 00:18:16 02432_s3_parallel_parts_cleanup:                                        [ OK ] 118.46 sec.
2023-06-06 00:18:18 00988_parallel_parts_removal:                                           [ OK ] 58.17 sec.
2023-06-06 00:18:19 00988_parallel_parts_removal:                                           [ OK ] 62.23 sec.
2023-06-06 00:18:28 01810_max_part_removal_threads_long:                                    [ OK ] 41.74 sec.
2023-06-06 00:18:37 02432_s3_parallel_parts_cleanup:                                        [ OK ] 79.20 sec.
2023-06-06 00:19:00 02432_s3_parallel_parts_cleanup:                                        [ OK ] 101.25 sec.
2023-06-06 00:19:07 00988_parallel_parts_removal:                                           [ OK ] 62.26 sec.
2023-06-06 00:19:09 01810_max_part_removal_threads_long:                                    [ OK ] 52.91 sec.
2023-06-06 00:19:10 01810_max_part_removal_threads_long:                                    [ OK ] 50.49 sec.

It takes from 50-120 seconds to execute it usually...

And 01605_adaptive_granularity_block_borders is flaky https://play.clickhouse.com/play?user=play#U0VMRUNUIGNoZWNrX25hbWUsIHRlc3RfbmFtZSwgcmVwb3J0X3VybApGUk9NIGNoZWNrcwpXSEVSRSBjaGVja19uYW1lIExJS0UgJ1N0YXRlJScKICAgIEFORCBjaGVja19zdGFydF90aW1lID49IG5vdygpIC0gSU5URVJWQUwgNzIgSE9VUgogICAgQU5EIHB1bGxfcmVxdWVzdF9udW1iZXIgPSAwCiAgICBBTkQgdGVzdF9zdGF0dXMgIT0gJ1NLSVBQRUQnCiAgICBBTkQgdGVzdF9zdGF0dXMgTElLRSAnRiUnCiAgICBBTkQgY2hlY2tfc3RhdHVzICE9ICdzdWNjZXNzJyBBTkQgdGVzdF9uYW1lPScwMTYwNV9hZGFwdGl2ZV9ncmFudWxhcml0eV9ibG9ja19ib3JkZXJzJwpPUkRFUiBCWSBjaGVja19uYW1lLCB0ZXN0X25hbWUsIGNoZWNrX3N0YXJ0X3RpbWU=

@nikitamikhaylov nikitamikhaylov merged commit e873480 into master Jun 6, 2023
@nikitamikhaylov nikitamikhaylov deleted the rework-part-loading-and-deletion branch June 6, 2023 12:42
baibaichen added a commit to Kyligence/gluten that referenced this pull request Jun 7, 2023
baibaichen added a commit to Kyligence/gluten that referenced this pull request Jun 7, 2023
baibaichen added a commit to apache/gluten that referenced this pull request Jun 7, 2023
* [GLUTEN-1632][CH]Daily Update Clickhouse Version (20230607)

* Fix since ClickHouse/ClickHouse#49474

---------

Co-authored-by: kyligence-git <[email protected]>
Co-authored-by: Chang Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants