Skip to content

Fix prewhere without columns and without adaptive index granularity (almost w/o anything)#59173

Merged
alesapin merged 10 commits intomasterfrom
fix_prewhere_without_columns
Jul 5, 2024
Merged

Fix prewhere without columns and without adaptive index granularity (almost w/o anything)#59173
alesapin merged 10 commits intomasterfrom
fix_prewhere_without_columns

Conversation

@davenger
Copy link
Copy Markdown
Member

@davenger davenger commented Jan 24, 2024

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fix logical error when PREWHERE expression read no columns and table has no adaptive index granularity (very old table). Fix #56640.

  • Woolen Wolfdog

@davenger davenger marked this pull request as draft January 24, 2024 17:21
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-bugfix Pull request with bugfix, not backported by default label Jan 24, 2024
@robot-ch-test-poll1
Copy link
Copy Markdown
Contributor

robot-ch-test-poll1 commented Jan 24, 2024

This is an automated comment for commit 32a61e6 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
Bugfix validationChecks that either a new test (functional or integration) or there some changed tests that fail with the binary built on master branch❌ failure
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
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors❌ failure
Successful checks
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
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ 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
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
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

@davenger davenger force-pushed the fix_prewhere_without_columns branch from e8cefd8 to 02b3498 Compare January 29, 2024 19:16
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jun 25, 2024

Dear @davenger, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message.

@alesapin alesapin self-assigned this Jul 3, 2024
@alesapin alesapin changed the title [WIP] Fix prewhere without columns Fix prewhere without columns Jul 3, 2024
@alesapin alesapin changed the title Fix prewhere without columns Fix prewhere without columns and without adaptive index granularity (almost w/o anything) Jul 3, 2024
@alesapin alesapin marked this pull request as ready for review July 3, 2024 16:13
@alesapin
Copy link
Copy Markdown
Member

alesapin commented Jul 4, 2024

> test_broken_part_during_merge/test.py::test_merge_and_part_corruption
Unrelated :(

@alesapin
Copy link
Copy Markdown
Member

alesapin commented Jul 5, 2024

Abort unrelated:

2024-07-04 17:25:16 Thread 1030 "TCPHandler" received signal SIGABRT, Aborted.
2024-07-04 17:25:16 [Switching to Thread 0x7fac03351640 (LWP 10391)]
2024-07-04 17:25:16 0x00007faeb42f39fc in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6
2024-07-04 17:25:17 #0  0x00007faeb42f39fc in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6
2024-07-04 17:25:17 No symbol table info available.
2024-07-04 17:25:17 #1  0x00007faeb429f476 in raise () from /lib/x86_64-linux-gnu/libc.so.6
2024-07-04 17:25:17 No symbol table info available.
2024-07-04 17:25:17 #2  0x00007faeb42857f3 in abort () from /lib/x86_64-linux-gnu/libc.so.6
2024-07-04 17:25:17 No symbol table info available.
2024-07-04 17:25:17 #3  0x00007faeb428571b in ?? () from /lib/x86_64-linux-gnu/libc.so.6
2024-07-04 17:25:17 No symbol table info available.
2024-07-04 17:25:17 #4  0x00007faeb4296e96 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
2024-07-04 17:25:18 No symbol table info available.
2024-07-04 17:25:18 #5  0x0000000010a444cf in DB::DatabaseReplicated::removeDetachedPermanentlyFlag (this=0x7fac2e86ec18, local_context=..., table_name=..., table_metadata_path=..., attach=false) at /build/src/Databases/DatabaseReplicated.cpp:1610
2024-07-04 17:25:18         txn = {__ptr_ = 0x7fac342ebb78, __cntrl_ = 0x7fac342ebb60}
2024-07-04 17:25:18         new_digest = 17338183612924859206
2024-07-04 17:25:18         lock = {__m_ = @0x7fac2e86ef78}
2024-07-04 17:25:18 #6  0x00000000109fe78d in DB::DatabaseOnDisk::createTable (this=0x7fac2e86ec18, local_context=..., table_name=..., table=..., query=...) at /build/src/Databases/DatabaseOnDisk.cpp:259
2024-07-04 17:25:21         table_metadata_path = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x7fac25cf5700 "/var/lib/clickhouse/store/ce4/ce40f23d-9517-4736-88e9-e8fbef118a71/test_move_partition_dest.sql", __size_ = 95, __cap_ = 160, __is_long_ = 1}, __s = {__data_ = "\000W\317%\254\177\000\000_\000\000\000\000\000\000\000\240\000\000\000\000\000", __padding_ = 0x7fac033375cf "\200", __size_ = 0 '\000', __is_long_ = 1 '\001'}, __r = {__words = {140377345447680, 95, 9223372036854775968}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}
2024-07-04 17:25:21         table_metadata_tmp_path = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x7fabe098cec0 "/var/lib/clickhouse/store/ce4/ce40f23d-9517-4736-88e9-e8fbef118a71/test_move_partition_dest.sql.tmp", __size_ = 99, __cap_ = 112, __is_long_ = 1}, __s = {__data_ = "\300Θ\340\253\177\000\000c\000\000\000\000\000\000\000p\000\000\000\000\000", __padding_ = 0x7fac033375f7 "\200`y3\003\254\177", __size_ = 0 '\000', __is_long_ = 1 '\001'}, __r = {__words = {140376184245952, 99, 9223372036854775920}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}
2024-07-04 17:25:21         statement = {static __endian_factor = 1, __r_ = {<std::__1::__compressed_pair_elem<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, 0, false>> = {__value_ = {{__l = {__data_ = 0x7fabbc00bb00 "ATTACH TABLE _ UUID '4a089bd2-b11b-40ce-a5ea-d5b27b2a5285'\n(\n    `pk` UInt8,\n    `val` UInt32\n)\nENGINE = MergeTree\nPARTITION BY pk\nORDER BY (pk, val)\nSETTINGS index_granularity = 8192, index_granulari"..., __size_ = 1034, __cap_ = 1040, __is_long_ = 1}, __s = {__data_ = "\000\273\000\274\253\177\000\000\n\004\000\000\000\000\000\000\020\004\000\000\000\000", __padding_ = 0x7fac033375b7 "\200", __size_ = 0 '\000', __is_long_ = 1 '\001'}, __r = {__words = {140375570299648, 1034, 9223372036854776848}}}}}, <std::__1::__compressed_pair_elem<std::__1::allocator<char>, 1, true>> = {<std::__1::allocator<char>> = {<std::__1::__non_trivial_if<true, std::__1::allocator<char> >> = {<No data fields>}, <No data fields>}, <No data fields>}, <No data fields>}, static npos = 18446744073709551615}

@alesapin
Copy link
Copy Markdown
Member

alesapin commented Jul 5, 2024

Bugfix broken

@alesapin alesapin added this pull request to the merge queue Jul 5, 2024
@alesapin alesapin removed this pull request from the merge queue due to a manual request Jul 5, 2024
@alesapin alesapin added this pull request to the merge queue Jul 5, 2024
Merged via the queue into master with commit 8de9141 Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default 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.

Logical error: 'RangeReader read 576 rows, but 8192 expected.'

4 participants