Commit Graph

110571 Commits

Author SHA1 Message Date
save-my-heart
d70c352313 checksum: do not check inverted index files 2023-03-15 16:43:59 +08:00
Jordi Villar
2f8772131e Add test to prevent regressions when using bitmapHasAny 2023-03-15 09:16:09 +01:00
Azat Khuzhin
c0d7c826b8 Fix possible failures of 01300_client_save_history_when_terminated_long
The problem is that completion request can takes too much time,
especially with S3 storage, and because of this it fails sometimes after
client writes "Bye.", like here [1]:

    2023-03-07 22:20:22 send: sending "\u0004" to { exp7 }
    2023-03-07 22:20:22 Bye.
    2023-03-07 22:20:22  [?2004lexpect: timed out

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/47295/946dff2d04e7f7af8d3541ed7de11f195b521b6c/stateless_tests__release__s3_storage__[2/2].html

And from server logs:

    2023.03.07 22:19:21.885151 [ 41723 ] {00cb66fe-d01f-40ca-a6ef-b7dbd9f69d9e} <Trace> ContextAccess (default): Access granted: CREATE DATABASE ON test_4xqrwzwv.*
    ...
    2023.03.07 22:19:22.286606 [ 5806 ] {} <Debug> TCPHandler: Connected ClickHouse client version 23.3.0, revision: 54461, database: test_4xqrwzwv, user: default.
    2023.03.07 22:19:22.287361 [ 5806 ] {1493527c-8b85-4080-be82-a1c78829a104} <Debug> executeQuery: (from [::1]:40978) SELECT DISTINCT arrayJoin(extractAll(name, '[\\w_]{2,}')) AS res FROM (SELECT * FROM viewIfPermitted(SELECT name FROM system.functions ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT name FROM system.table_engines ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT name FROM system.formats ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT name FROM system.table_functions ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT name FROM system.data_type_families ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT name FROM system.merge_tree_settings ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT name FROM system.settings ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT cluster FROM system.clusters ELSE null('cluster String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT macro FROM system.macros ELSE null('macro String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT policy_name FROM system.storage_policies ELSE null('policy_name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT concat(func.name, comb.name) AS x FROM system.functions AS func CROSS JOIN system.aggregate_function_combinators AS comb WHERE is_aggregate ELSE null('x String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT name FROM system.databases LIMIT 10000 ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT DISTINCT name FROM system.tables LIMIT 10000 ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT DISTINCT name FROM system.dictionaries LIMIT 10000 ELSE null('name String')) UNION ALL SELECT * FROM viewIfPermitted(SELECT DISTINCT name FROM system.columns LIMIT 10000 ELSE null('name String'))) WHERE notEmpty(res) (stage: Complete)
    ...
    2023.03.07 22:20:22.316230 [ 58563 ] {} <Trace> DynamicQueryHandler: Request URI: /?query=DROP+DATABASE+IF+EXISTS+test_4xqrwzwv&database=system&connect_timeout=539&receive_timeout=539&send_timeout=539&http_connection_timeout=539&http_receive_timeout=539&http_send_timeout=539&log_comment=01300_client_save_history_when_terminated_long.expect
    ...
    2023.03.07 22:20:45.575830 [ 5806 ] {1493527c-8b85-4080-be82-a1c78829a104} <Warning> TCPHandler: Client has gone away.
    2023.03.07 22:20:45.575843 [ 5806 ] {1493527c-8b85-4080-be82-a1c78829a104} <Debug> TCPHandler: Processed in 83.289128886 sec.

So query for autocomplete takes 83 seconds!

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-15 08:56:57 +01:00
Azat Khuzhin
bcf381c5ae Reimplement interserver mode to avoid replay attacks
Prevous implementation (DBMS_MIN_REVISION_WITH_INTERSERVER_SECRET)
accepts the salt from the client, which make it useless.

Reimplement the protocol to send the salt by the server and use it in
the client instead.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-15 08:28:43 +01:00
Rich Raposa
3692f47bf0
Merge branch 'master' into new-nav 2023-03-14 22:20:31 -06:00
Alexey Milovidov
8e0a2a3a27
Merge pull request #47598 from ClickHouse/fix-wording
Update storing-data.md
2023-03-15 04:26:09 +03:00
San
b6de44e0e3
Update storing-data.md
Just a small update I spotted when discussing encryption at rest with others
2023-03-15 11:37:42 +11:00
Nikolay Degterinsky
398978e0bc Fix build 2023-03-15 00:09:29 +00:00
Alexey Milovidov
f4f7e110b6
Merge branch 'master' into patch-2 2023-03-15 02:03:52 +03:00
Alexey Milovidov
a0663e00cb
Merge pull request #47553 from azat/tests/flakiness-v1
Fix some flaky tests
2023-03-15 02:02:45 +03:00
Nikolay Degterinsky
f3908a9e84 Fix style 2023-03-14 22:49:10 +00:00
Vitaly Baranov
c9f4143514 Fix build. 2023-03-14 23:34:48 +01:00
Vitaly Baranov
25356786ea Simplify the implementation, create new utility function copyS3FileToDisk(). 2023-03-14 23:34:44 +01:00
Robert Schulze
b91a537096
Address clang-tidy slowness 2023-03-14 22:24:20 +00:00
robot-clickhouse-ci-1
e8c6d55c22
Merge pull request #47582 from CurtizJ/fix-perf-regression
Fix performance regression in aggregation
2023-03-14 23:17:53 +01:00
Nikolay Degterinsky
eddda2eb73 Add SSL authentication to the native protocol 2023-03-14 22:10:08 +00:00
Ilya Yatsishin
82a6d75050
Merge pull request #47535 from ucasfl/insrt
Add INSTR as alias of positionCaseInsensitive for MySQL compatibility
2023-03-14 22:00:40 +01:00
Rich Raposa
e9073dfe43
Merge branch 'master' into new-nav 2023-03-14 13:31:33 -06:00
Alexey Milovidov
e443c4e682
Merge pull request #47538 from Avogar/proper-parquet-fix
Proper fix for bug in parquet, revert reverted #45878
2023-03-14 22:29:39 +03:00
Han Fei
6cdd3ffb31
Merge pull request #47541 from azat/dist/preserve-error-on-flush
Preserve error in system.distribution_queue on SYSTEM FLUSH DISTRIBUTED
2023-03-14 20:25:01 +01:00
Antonio Andelic
b611ae5f02
Merge pull request #47526 from ClickHouse/fix-monotonicity-check
Fix monotonicity check for DateTime64
2023-03-14 20:20:52 +01:00
Denny Crane
97a42dbada
Update settings.md 2023-03-14 15:13:46 -03:00
Maksim Kita
26ba62bb9e ReadFromMergeTree explain prewhere and row policy actions 2023-03-14 18:02:56 +01:00
Alexander Tokmakov
f3fe696863
Merge pull request #47581 from ClickHouse/revert-47216-Backup_Restore_concurrency_check_node
Revert "Backup_Restore_concurrency_check_node"
2023-03-14 18:56:31 +03:00
Alexander Tokmakov
773cd5a686
Revert "Backup_Restore_concurrency_check_node" 2023-03-14 18:55:08 +03:00
Anton Popov
d2a8cd3ed4 fix performance regression 2023-03-14 14:51:28 +00:00
Alexander Tokmakov
275acb756a
Merge pull request #47575 from azat/ci/log-stats
Add missing SYSTEM FLUSH LOGS for log messages statistics
2023-03-14 17:37:07 +03:00
Vasily Nemkov
d3199da1d2
Simplify clickhouse-test usage with -b
Now it is possible to run it even without `clickhouse` binary in PATH.
2023-03-14 15:31:36 +01:00
Azat Khuzhin
7e5c643926 Fix 02572_system_logs_materialized_views_ignore_errors flakiness
v2: Add missing SYSTEM FLUSH LOGS to 02572_system_logs_materialized_views_ignore_errors
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-14 15:25:48 +01:00
Michael Kolupaev
92046d7b56 Make test 02473_optimize_old_parts less flaky 2023-03-14 07:21:07 -07:00
robot-ch-test-poll4
8bbfba39d5
Merge pull request #47542 from ClickHouse/totals-in-fill-transform
Remove TOTALS handling in FillingTransform
2023-03-14 15:05:32 +01:00
Azat Khuzhin
ad5dfc159b Add missing SYSTEM FLUSH LOGS for log messages statistics
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-14 14:34:02 +01:00
SmitaRKulkarni
52b6976822
Merge pull request #47495 from ClickHouse/Parameterized_view_bug_fix_47287_47247
Parameterized view bug fix 47287 47247
2023-03-14 14:33:44 +01:00
Azat Khuzhin
a72647690d Change error code in case of columns definitions was empty in ODBC
CI reports [1]:

    2023.03.14 00:29:07.031349 [ 166170 ] {110f8654-7d7d-4b47-b6b0-3ce83414a80f} <Error> ReadWriteBufferFromHTTP: HTTP request to `http://127.0.0.1:9018/columns_info?use_connection_pooling=1&version=1&connection_string=DSN%3D%7BClickHouse%20DSN%20%28ANSI%29%7D&schema=test_15&table=t&external_table_functions_use_nulls=1` failed at try 1/1 with bytes read: 0/unknown. Error: DB::HTTPException: Received error from remote server /columns_info?use_connection_pooling=1&version=1&connection_string=DSN%3D%7BClickHouse%20DSN%20%28ANSI%29%7D&schema=test_15&table=t&external_table_functions_use_nulls=1. HTTP status code: 500 Internal Server Error, body: Error getting columns from ODBC 'Code: 49. DB::Exception: Columns definition was not returned. (LOGICAL_ERROR) (version 23.2.4.12 (official build))'

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/47541/3d247b8635da44bccfdeb5fcd53be7130b8d0a32/upgrade_check__msan_.html

Here the problem is that system.columns has cached value for number of
total table to iterate, and so it can skip something.

But anyway, this should be LOGICAL_ERROR, since ODBC bridge does two
queries:
- to system.tables and
- to system.columns

And if between this two queries the table will be removed, them there
will be no columns

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-14 14:24:11 +01:00
Sema Checherinda
95e994a9cd
Merge pull request #47304 from arthurpassos/fix_find_first_not_symbols
Modify find_first_symbols so it works as expected for find_first_not_symbols
2023-03-14 14:24:05 +01:00
MeenaRenganathan22
91625184a3 Updated the krb5 submodule reference 2023-03-14 06:23:22 -07:00
Azat Khuzhin
f540a14fae ci/upgrade: store system.*_log tables on local filesystem (and fix artifacts)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-14 14:13:05 +01:00
Azat Khuzhin
55296c4881 ci/upgrade: remove obsolete function call
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-14 14:13:04 +01:00
Azat Khuzhin
7e1db1a7f7 ci/upgrade: fix creating system database with Ordinary engine
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-03-14 14:12:32 +01:00
Nikolay Degterinsky
cfb4267cfc
Merge pull request #47565 from aerosol/fix-typo
Fix typo
2023-03-14 13:51:20 +01:00
Dmitry Novik
802a3d8ed2 Fix style 2023-03-14 12:46:59 +00:00
Vitaly Baranov
859082c4b7
Merge pull request #47216 from ClickHouse/Backup_Restore_concurrency_check_node
Backup_Restore_concurrency_check_node
2023-03-14 13:36:43 +01:00
Dmitry Novik
cced9cf613 Fix build 2023-03-14 12:04:39 +00:00
Dmitry Novik
ae3d30a736 Merge remote-tracking branch 'origin/master' into fix-grouping-for-grouping-sets 2023-03-14 12:01:51 +00:00
Adam Rutkowski
694ba01c78 Fix typo 2023-03-14 12:48:00 +01:00
alesapin
d9b9d6c9ef
Merge branch 'master' into small-enhancements 2023-03-14 12:13:09 +01:00
Alexander Tokmakov
5a1ee881f8
Merge pull request #47547 from ClickHouse/filter_too_frequent_logs
Hide too noisy log messages, fix some tests
2023-03-14 13:53:21 +03:00
Nikolai Kochetov
396e1b45a4
Merge pull request #47433 from ClickHouse/apply-settings-for-explain-earlier
Apply settings for EXPLAIN earlier (in the same way we do for SELECT).
2023-03-14 11:52:20 +01:00
Nikolai Kochetov
0298a96d81
Merge pull request #47451 from ClickHouse/disable-logical-expression-optimizer-with-aliases
Disable logical expression optimizer for expression with aliases.
2023-03-14 11:51:24 +01:00
Nikolai Kochetov
be0ae6a238
Merge pull request #47537 from ClickHouse/lc_null_as_default
Fix block structure mismatch for nullable LowCardinality column
2023-03-14 11:45:39 +01:00