Commit Graph

105797 Commits

Author SHA1 Message Date
alesapin
261dc06be9 Fix flaky ttl test 2023-01-17 17:08:32 +01:00
Nikita Mikhaylov
0fc755806e
One more attempt to fix race in TCPHandler (#45240) 2023-01-17 16:17:14 +01:00
Han Fei
8a74238fe0 improve 2023-01-17 15:47:52 +01:00
Kruglov Pavel
582aa8b770
Merge pull request #45253 from Avogar/fix-s3-heap-use-after-free
Fix heap-use-after-free in reading from s3
2023-01-17 15:32:26 +01:00
HarryLeeIBM
e7add8218f Addressed more review comments and ClangTidy errors 2023-01-17 06:29:13 -08:00
Azat Khuzhin
54fc6859ae Fix race in Distributed table startup
Before this patch it was possible to have multiple directory monitors
for the same directory, one from the INSERT context, another one on
storage startup().

Here are an example of logs for this scenario:

    2022.12.07 12:12:27.552485 [ 39925 ] {a47fcb32-4f44-4dbd-94fe-0070d4ea0f6b} <Debug> DDLWorker: Executed query: DETACH TABLE inc.dist_urls_in
    ...
    2022.12.07 12:12:33.228449 [ 4408 ] {20c761d3-a46d-417b-9fcd-89a8919dd1fe} <Debug> executeQuery: (from 0.0.0.0:0, user: ) /* ddl_entry=query-0000089229 */ ATTACH TABLE inc.dist_urls_in (stage: Complete)
    ... this is the DirectoryMonitor created from the context of INSERT for the old StoragePtr that had not been destroyed yet (becase of "was 1" this can be done only from the context of INSERT) ...
    2022.12.07 12:12:35.556048 [ 39536 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Files set to 173 (was 1)
    2022.12.07 12:12:35.556078 [ 39536 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Bytes set to 29750181 (was 71004)
    2022.12.07 12:12:35.562716 [ 39536 ] {} <Trace> Connection (i13.ch:9000): Connected to ClickHouse server version 22.10.1.
    2022.12.07 12:12:35.562750 [ 39536 ] {} <Debug> inc.dist_urls_in.DirectoryMonitor: Sending a batch of 10 files to i13.ch:9000 (0.00 rows, 0.00 B bytes).
    ... this is the DirectoryMonitor that created during ATTACH ...
    2022.12.07 12:12:35.802080 [ 39265 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Files set to 173 (was 0)
    2022.12.07 12:12:35.802107 [ 39265 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Bytes set to 29750181 (was 0)
    2022.12.07 12:12:35.834216 [ 39265 ] {} <Debug> inc.dist_urls_in.DirectoryMonitor: Sending a batch of 10 files to i13.ch:9000 (0.00 rows, 0.00 B bytes).
    ...
    2022.12.07 12:12:38.532627 [ 39536 ] {} <Trace> inc.dist_urls_in.DirectoryMonitor: Sent a batch of 10 files (took 2976 ms).
    ...
    2022.12.07 12:12:38.601051 [ 39265 ] {} <Error> inc.dist_urls_in.DirectoryMonitor: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in file_size: No such file or directory ["/data6/clickhouse/data/inc/dist_urls_in/shard13_replica1/66827403.bin"], Stack trace (when copying this message, always include the lines below):
    ...
    2022.12.07 12:12:54.132837 [ 4408 ] {20c761d3-a46d-417b-9fcd-89a8919dd1fe} <Debug> DDLWorker: Executed query: ATTACH TABLE inc.dist_urls_in

And eventually both monitors (for a short period of time, one replaces
another) are trying to process the same batch (current_batch.txt), and
one of them fails because such file had been already removed.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-17 14:51:00 +01:00
Igor Nikonov
6328e02f22 Fix: update input/output stream properties
After removing sorting step we need to update sorting properties of
input/ouput streams
2023-01-17 13:39:18 +00:00
Maksim Kita
d758d83937 Analyzer compound identifier typo correction fix 2023-01-17 14:29:48 +01:00
Antonio Andelic
ba363c141a Fix integration test 2023-01-17 13:12:52 +00:00
alesapin
b23ba36a4f
Merge pull request #45339 from ClickHouse/util-decompressor-wsl1
WSL1 inconsistency
2023-01-17 14:10:21 +01:00
Vitaly Baranov
8c5c423d67 Add test. 2023-01-17 13:11:24 +01:00
Sema Checherinda
35431e91e3
Merge pull request #45276 from ucasfl/avro-fix
Fix some avro reading bugs
2023-01-17 12:48:44 +01:00
Kseniia Sumarokova
5586f71950
Merge pull request #41231 from kssenii/minor-change-in-remote-read
Fix assertion in async read buffer from remote
2023-01-17 12:32:57 +01:00
kssenii
a657bbece7 Merge remote-tracking branch 'upstream/master' into slightly-better-output-for-glibc-check 2023-01-17 12:23:44 +01:00
kssenii
f3c1dc0c85 Slightly better output of glibc check 2023-01-17 12:17:57 +01:00
Maksim Kita
d6a36b1d16 Fixed code review issues 2023-01-17 12:02:50 +01:00
Maksim Kita
af716ca25d Fixed tests 2023-01-17 11:20:24 +01:00
Maksim Kita
250c93614c Revert "Revert "Validate function arguments in query tree"" 2023-01-17 11:20:24 +01:00
Vitaly Baranov
692065e5fe Fix backup if mutations got killed during the backup process. 2023-01-17 11:05:34 +01:00
Vitaly Baranov
b13498d9ba
Merge pull request #45288 from vitlibar/fix-s3-requests-without-region
Fix s3 requests without region
2023-01-17 09:24:59 +01:00
Antonio Andelic
76eb3e3b3c Fix test 2023-01-17 07:34:39 +00:00
SmitaRKulkarni
bb4f251448
Merge branch 'master' into 42648_Support_scalar_subqueries_cache 2023-01-17 08:10:25 +01:00
Kseniia Sumarokova
6a02bdc917
Update AsynchronousReadIndirectBufferFromRemoteFS.cpp 2023-01-17 00:37:47 +01:00
Vitaly Baranov
9a52087989 More complex logic: GetObjectAttributes requests will be used
only if the endpoint is "*.amazonaws.com", otherwise HeadObject requests will be used.
2023-01-16 20:14:39 +01:00
Dmitry Novik
104e55bc22 Merge remote-tracking branch 'origin/master' into or-like-chain 2023-01-16 18:56:22 +00:00
Dmitry Novik
aa2a19eaa4 Use proper map for QueryTreeNode 2023-01-16 18:43:22 +00:00
Yakov Olkhovskiy
c8f635e40b WSL1 inconsistency 2023-01-16 18:32:41 +00:00
Dmitry Novik
72c1e0ae0f Rename test 2023-01-16 17:52:15 +00:00
Dmitry Novik
0aecc9ad80 Updates after the review 2023-01-16 17:43:36 +00:00
Vladimir C
b80ee8df50
Merge pull request #45256 from DanRoscigno/add-grace-hash-docs 2023-01-16 18:43:19 +01:00
Kruglov Pavel
bdb3517512
Merge pull request #45231 from Avogar/json-tuples
Insert default values in case of missing tuple elements in JSONEachRow
2023-01-16 17:49:50 +01:00
Mikhail f. Shiryaev
51b5d647ae
Merge pull request #45302 from ClickHouse/fix-automerge-approved-at
Fix wrong approved_at, simplify conditions
2023-01-16 17:46:30 +01:00
Alexander Tokmakov
753ae9e80d
Merge pull request #45327 from ClickHouse/revert-45252-block-nonfloat-gorilla
Revert "Disallow Gorilla codec on non-float columns"
2023-01-16 19:16:06 +03:00
Alexander Tokmakov
df75c24f01
Revert "Disallow Gorilla codec on non-float columns" 2023-01-16 19:14:28 +03:00
Mikhail f. Shiryaev
08c9d81c90
Apply suggestions from code review
Co-authored-by: Igor Nikonov <954088+devcrafter@users.noreply.github.com>
2023-01-16 16:55:24 +01:00
Kruglov Pavel
04d95f4877
Fix 2023-01-16 16:47:04 +01:00
Mikhail f. Shiryaev
1bd7279d5f
Improve manual to get binaries from CI 2023-01-16 16:45:30 +01:00
Antonio Andelic
108b2384e7 Disable prewhere in storage merge if types don't match 2023-01-16 13:39:46 +00:00
Anton Popov
6863cd152f
Merge pull request #42181 from CurtizJ/optimize-loading-parts
Do not load inactive parts at startup
2023-01-16 14:38:50 +01:00
Kseniia Sumarokova
57c22f005b
Merge branch 'master' into minor-change-in-remote-read 2023-01-16 14:22:16 +01:00
Kseniia Sumarokova
7b612da871
Update AsynchronousReadIndirectBufferFromRemoteFS.cpp 2023-01-16 14:21:09 +01:00
Kseniia Sumarokova
4d22b49be7
Update DiskObjectStorage.cpp 2023-01-16 14:19:18 +01:00
Alexander Tokmakov
d361402347
Merge pull request #45307 from ClickHouse/tavplubix-patch-1
Disable 02028_create_select_settings with Ordinary
2023-01-16 16:13:53 +03:00
Han Fei
30a798182a Merge branch 'master' into hanfei/async-cache 2023-01-16 14:07:36 +01:00
Nikolay Degterinsky
70e79de69b
Merge pull request #38252 from bharatnc/ncb/weighted-quantile-approx
add quantileInterpolatedWeighted function
2023-01-16 13:41:13 +01:00
Nikolay Degterinsky
88ba1b0b85
Merge pull request #42884 from evillique/better_asterisk_parser
Improve Asterisk and ColumnMatcher parsers
2023-01-16 13:29:59 +01:00
Vladimir C
0337bc7c4d
Merge pull request #45147 from rgzntrade/master 2023-01-16 13:18:18 +01:00
Igor Nikonov
a34991cb65 Merge remote-tracking branch 'origin/master' into igor/remove_redundant_order_by 2023-01-16 12:14:02 +00:00
Alexander Tokmakov
ee888f7f38
Merge pull request #44547 from ClickHouse/fix_44496
Fix too aggressive evaluation of args in default column expr
2023-01-16 15:08:58 +03:00
Alexander Tokmakov
26e6cb0899
Update 02028_create_select_settings.sql 2023-01-16 14:51:32 +03:00