Commit Graph

107307 Commits

Author SHA1 Message Date
Alexey Milovidov
2dc014254e Update tests 2023-02-08 03:37:46 +01:00
Alexey Milovidov
a67eac20fb
Merge pull request #46090 from azat/clickhouse-test-logs
Add also last messages from stdout/stderr/debuglog in clickhouse-test
2023-02-08 05:28:43 +03:00
Alexey Milovidov
66e9dd3c94
Update README.md 2023-02-08 04:53:47 +03:00
Alexey Milovidov
da22a770a0
Merge pull request #46107 from kssenii/rabbit-test-overloaded-insert-fix
Fix flaky rabbitmq test
2023-02-08 04:14:03 +03:00
Alexey Milovidov
924f19e94a
Update AzureBlobStorageAuth.cpp 2023-02-08 04:12:00 +03:00
Nikolay Degterinsky
4040b9c91b
Interpret cluster_name identifier in s3Cluster function as literal 2023-02-08 00:39:19 +01:00
Alexey Milovidov
41722a6163 Fix assertion in statistical functions 2023-02-08 00:15:32 +01:00
Alexey Milovidov
55c3bbb739 Fix assertion in statistical functions 2023-02-08 00:09:41 +01:00
SadiHassan
b3d8dd766f update CapnProto to v0.10.3 to avoid CVE-2022-46149 2023-02-07 14:47:28 -08:00
Vitaly Baranov
3db9d58fcf Added test. 2023-02-07 23:46:48 +01:00
Alexey Milovidov
b10bc50c6a
Merge pull request #46137 from ClickHouse/tylerhannan-patch-1
Adding FOSDEM
2023-02-08 01:31:21 +03:00
Alexey Milovidov
d6af40a4b4
Merge pull request #46135 from DanRoscigno/add-mermaid
Use mermaid chart in dev architecture doc
2023-02-08 01:30:50 +03:00
Kseniia Sumarokova
a5d3b00699
Merge pull request #46010 from kssenii/named-collections-fix-access
Fix named collections access
2023-02-07 23:20:22 +01:00
Tyler Hannan
a60a3726e8
Adding FOSDEM 2023-02-07 23:06:32 +01:00
DanRoscigno
fe5bc01951 merged Mermaid support today 2023-02-07 14:43:36 -05:00
Azat Khuzhin
eded2b8ba0 Updated tests to match new SETTINGS behavior
Refernce files had been checked manually and using this onelinear:

  $ diff <(jq -r .bool ../tests/queries/0_stateless/02152_bool_type_parsing.stdout) ../tests/queries/0_stateless/02152_bool_type_parsing.reference

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 19:41:34 +01:00
Azat Khuzhin
911fabd0dc Fix applying settings for FORMAT on the client
Previously the following query does not works correctly:

    SELECT number FROM numbers(5) SETTINGS output_format_json_array_of_rows = 1 FORMAT JSONEachRow

While this one works OK:

    SELECT number FROM numbers(5) FORMAT JSONEachRow SETTINGS output_format_json_array_of_rows = 1

The problem is in which AST those settings are stored, use the logic as
executeQuery() has to apply them:

  c83f701696/src/Interpreters/executeQuery.cpp (L467-L497)

Note, the only problem should be with the settings for FORMAT, since
client applies thoes settings (and formats) locally w/o server, while in
case of i.e. HTTP it will be applied on the server and everything will
works fine.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 18:29:40 +01:00
Nikolay Degterinsky
e5b5fce970
Update liburing CmakeLists.txt 2023-02-07 18:11:43 +01:00
Kseniia Sumarokova
41dbdcff67
Merge branch 'master' into simplify-storage-s3-configuration 2023-02-07 18:09:34 +01:00
Azat Khuzhin
d21f6a0bd6 Fix WriteBufferFromFile destructor after close()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 17:59:05 +01:00
Azat Khuzhin
a88903f276 Do not execute expressions inside chassert() in release builds (with sizeof() trick)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 17:39:16 +01:00
Nikolai Kochetov
3912f5a333
Merge pull request #45681 from CurtizJ/compact-parts-vertical-merge
Allow vertical merges from compact to wide parts
2023-02-07 17:09:17 +01:00
Azat Khuzhin
ff324fe81a Fix fault injection in copier (wrong query syntax)
There are very frequent flakiness of `test_cluster_copier` test, here is
an example of copier failures on CI [1]:

    AssertionError: Instance: s0_1_0 (172.16.29.9). Info: {'ID': '5d68dcb46fdb4b0c54b7c7ba1ddde83b8f34d483bbb32abcb0c52b966444ce82', 'Running': False, 'ExitCode': 85, 'ProcessConfig': {'tty': False, 'entrypoint': '/usr/bin/clickhouse', 'arguments': ['copier', '--config', '/etc/clickhouse-server/config-copier.xml', '--task-path', '/clickhouse-copier/task_simple_4DFWYTDD49', '--task-file', '/task0_description.xml', '--task-upload-force', 'true', '--base-dir', '/var/log/clickhouse-server/copier', '--copy-fault-probability', '0.2', '--experimental-use-sample-offset', '1'], 'privileged': False, 'user': '0'}, 'OpenStdin': False, 'OpenStderr': True, 'OpenStdout': True, 'CanRemove': False, 'ContainerID': 'f356df6694b3cc09ee9830c623681626f8e8d999677c188b9fe911aa702784ca', 'DetachKeys': '', 'Pid': 84332}
    assert 85 == 0

But let's look what the error it is, apparently it is UNFINISHED:

    SELECT
        name,
        code
    FROM system.errors
    WHERE ((code % 256) = 85) AND (NOT remote)
    SETTINGS system_events_show_zero_values = 1

    ┌─name─────────────────────────────┬─code─┐
    │ FORMAT_IS_NOT_SUITABLE_FOR_INPUT │   85 │
    │ UNFINISHED                       │  341 │
    │ NO_SUCH_ERROR_CODE               │  597 │
    └──────────────────────────────────┴──────┘

Let's verify:

    $ grep -r UNFINISHED ./test_cluster_copier/_instances_0/s0_1_0/logs/copier/clickhouse-copier_*
    ./test_cluster_copier/_instances_0/s0_1_0/logs/copier/clickhouse-copier_20230206220846_368/log.log:2023.02.06 22:09:19.015251 [ 368 ] {} <Error> : virtual int DB::ClusterCopierApp::main(const std::vector<std::string> &): Code: 341. DB::Exception: Too many tries to process table cluster1.default.hits. Abort remaining execution. (UNFINISHED), Stack trace (when copying this message, always include the lines below):

And apparently that it is due to query error with fault injection:

    2023.02.06 22:09:15.654724 [ 368 ] {} <Error> Application: An error occurred while processing partition 0: Code: 62. DB::Exception: Syntax error (Query): failed at position 168 ('Native'): Native. Expected one of: token, Dot, OR, AND, BETWEEN, NOT BETWEEN, LIKE, ILIKE, NOT LIKE, NOT ILIKE, IN, NOT IN, GLOBAL IN, GLOBAL NOT IN, MOD, DIV, IS NULL, IS NOT NULL, alias, AS, Comma, OFFSET, WITH TIES, BY, LIMIT, SETTINGS, UNION, EXCEPT, INTERSECT, INTO OUTFILE, FORMAT, end of query. (SYNTAX_ERROR), Stack trace (when copying this message, always include the lines below):

Example:

    select x from x limit  1FORMAT Native

    Syntax error: failed at position 32 ('Native'):

So fixing this should fix test_cluster_copier flakiness.

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/46045/bd4170e03c6af583a51d12d2c39fa775dcb9997b/integration_tests__release__[4/4].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 17:01:06 +01:00
Azat Khuzhin
18d2a99761 Use comments for variables that clang can parse
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 16:53:45 +01:00
Zhiguo Zhou
b43ffb98e8
Vectorize filter generation of ColumnNullable in FilterDescription (#45962)
This commit achieved the data parallelism for filter generations of
the nullable columns by replacing the logical AND operator with the
bitwise one, which could be auto-vectorized by the compiler.
2023-02-07 16:33:01 +01:00
kssenii
40deaf1661 Fix clang-tidy 2023-02-07 16:30:04 +01:00
MeenaRenganathan22
2445a391fb Updating the libhdfs3 to reflect the revert of PR#21 2023-02-07 09:05:12 -05:00
Sema Checherinda
52d4e78b7f
Merge pull request #45907 from CheSema/forbid-wal-on-s3
do not run wal on remote disks
2023-02-07 14:48:00 +01:00
Yakov Olkhovskiy
4e7dffafe4
Merge pull request #46087 from ClickHouse/fix-ip-bloom
Allow bloom filter for IPv4 and IPv6
2023-02-07 08:29:28 -05:00
Yakov Olkhovskiy
909a772701
Merge pull request #45375 from ClibMouse/window_view_fix
Window view functional test failed on platform s390x
2023-02-07 08:23:50 -05:00
Sema Checherinda
750e7bfcb9
allow_drop_detached requires an argument 2023-02-07 13:46:00 +01:00
Vitaly Baranov
6555b48132 Disable evaluating the right part of IN operator while analyzing dependencies. 2023-02-07 13:21:30 +01:00
Han Fei
021e6e90cc
Merge pull request #45631 from hanfei1991/hanfei/regexp-refine
RegExpTreeDict use re2 engines when processing heavy regexps
2023-02-07 13:21:22 +01:00
Vitaly Baranov
324b0b6896 Fix DDLDependencyVisitor for an empty table name. 2023-02-07 13:21:18 +01:00
Azat Khuzhin
ec171c1732 Improve abortOnFailedAssertion() usage from chassert()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 13:03:47 +01:00
kssenii
022d4308ce Address review comments 2023-02-07 13:01:55 +01:00
Azat Khuzhin
bca85c6852 Fix test_merge_tree_azure_blob_storage::test_zero_copy_replication test
Here is an example of an error [1]:

    2023.02.06 21:59:09.076849 [ 200 ] {} <Information> DiskObjectStorage(DiskAzureBlobStorage): Starting up disk blob_storage_disk
    2023.02.06 21:59:09.076897 [ 200 ] {} <Information> DiskObjectStorage(DiskAzureBlobStorage): Disk blob_storage_disk started up
    2023.02.06 21:59:09.077263 [ 200 ] {} <Trace> StoragePolicy (blob_storage_policy): Storage policy blob_storage_policy created, total volumes 1
    2023.02.06 21:59:09.077318 [ 200 ] {} <Information> StoragePolicySelector: Storage policy `blob_storage_policy` loaded
    ...
    2023.02.06 21:59:09.227326 [ 1 ] {} <Error> Application: std::exception. Code: 1001, type: Azure::Storage::StorageException, e.what() = 409 The specified container already exists.
    The specified container already exists.
    RequestId:73d54dcf-0c66-489c-b9b8-2b5398df9384
    Time:2023-02-06T21:59:08.225Z
    Request ID: 73d54dcf-0c66-489c-b9b8-2b5398df9384, Stack trace (when copying this message, always include the lines below):

    0. ./build_docker/../contrib/llvm-project/libcxx/include/exception:134: std::runtime_error::runtime_error() @ 0x44297b8d in /usr/bin/clickhouse
    ...
    5. ./build_docker/../contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: DB::getAzureBlobContainerClient() @ 0x2f5b225f in /usr/bin/clickhouse
    6. ./build_docker/../src/Disks/ObjectStorages/AzureBlobStorage/registerDiskAzureBlobStorage.cpp:0:
    10. ./build_docker/../src/Interpreters/Context.cpp:0: DB::Context::getDisksMap() const @ 0x2f95af47 in /usr/bin/clickhouse
    ...
    13. ./build_docker/../contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714: DB::AsynchronousMetrics::start() @ 0x1f4d6161 in /usr/bin/clickhouse
    14. ./build_docker/../programs/server/Server.cpp:0: DB::Server::main() @ 0x1f3a5bfb in /usr/bin/clickhouse
    15. ./build_docker/../contrib/poco/Util/src/Application.cpp:0: Poco::Util::Application::run() @ 0x3c7546bf in /usr/bin/clickhouse
    16. ./build_docker/../programs/server/Server.cpp:476: DB::Server::run() @ 0x1f381f7b in /usr/bin/clickhouse
    17. ./build_docker/../contrib/poco/Util/src/ServerApplication.cpp:612: Poco::Util::ServerApplication::run(int, char**) @ 0x3c797ee0 in /usr/bin/clickhouse
    18. ./build_docker/../programs/server/Server.cpp:0: mainEntryClickHouseServer(int, char**) @ 0x1f37a262 in /usr/bin/clickhouse
    19. ./build_docker/../programs/main.cpp:0: main @ 0xe9d21ae in /usr/bin/clickhouse
    20. __libc_start_main @ 0x7f58271a1083 in ?
    21. _start @ 0xe90ef6e in /usr/bin/clickhouse
     (version 23.2.1.1)
    2023.02.06 21:59:09.227971 [ 1 ] {} <Error> Application: 409 The specified container already exists.
    The specified container already exists.
    RequestId:73d54dcf-0c66-489c-b9b8-2b5398df9384
    Time:2023-02-06T21:59:08.225Z
    Request ID: 73d54dcf-0c66-489c-b9b8-2b5398df9384

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/46045/bd4170e03c6af583a51d12d2c39fa775dcb9997b/integration_tests__asan__[6/6].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 12:52:36 +01:00
Azat Khuzhin
fe832c4418 Fix TOCTOU while checking for container existence in azure_blob_storage
This is a simple time-of-check vs time-of-use, since between checking
does such container exist and creating one, there is a time window.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 12:51:06 +01:00
kssenii
9485873a2f Fix integration test 2023-02-07 12:45:23 +01:00
kssenii
427f2d0257 Try fix rabbit test 2023-02-07 12:36:25 +01:00
Robert Schulze
690d873126
Merge pull request #46088 from ClickHouse/rs/fix-liburing-build
Fix build with `-DENABLE_LIBURING=0` (or `-DENABLE_LIBRARIES=0`)
2023-02-07 12:16:14 +01:00
Sergei Trifonov
950c04cb0e
Merge pull request #44907 from azat/dist/async-INSERT-error-message-fix
Fix error message for a broken distributed batches ("While sending batch")
2023-02-07 12:14:52 +01:00
Vitaly Baranov
f021c0eab6
Merge pull request #46058 from vitlibar/remove-unnecessary-execute-for-const-expr
Remove unnecessary execute() while evaluating a constant expression.
2023-02-07 12:09:37 +01:00
Robert Schulze
f9b6c10700
Merge pull request #46072 from ClickHouse/rs/follow-up-to-46057
Smallish follow-up to #46057
2023-02-07 11:52:51 +01:00
Azat Khuzhin
6587d11885 Check return value of close() in self-extracting-executable
And also add description into perror() over callign simply
perror(nullptr).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 11:28:22 +01:00
Azat Khuzhin
8cc41b7f41 Check return value of ::close()
Note, that according close(2), EINTR should not be retriable for close()

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-07 11:28:22 +01:00
taiyang-li
f41f41c78c fix doc; enable int type for pad 2023-02-07 18:25:36 +08:00
Kseniia Sumarokova
e6e482201c
Merge pull request #46078 from ClickHouse/kssenii-patch-6
Disable temporarily rabbitmq tests which use channel.startConsuming()
2023-02-07 11:17:27 +01:00
taiyang-li
59d4136142 fix fast tests 2023-02-07 17:29:13 +08:00
Vitaly Baranov
1fc82fbeec Fix test 01114_database_atomic (more rows to fit to execution time expected in test). 2023-02-07 02:31:58 +01:00