Commit Graph

37952 Commits

Author SHA1 Message Date
Azat Khuzhin
263c042c6a Fix opentelemetry for distributed batch sends
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
00115c6615 Rename readDistributedAsyncInsertHeader()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
a76d7b22c1 Use existing public methods of StorageDistributed in DistributedSink
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
e83699a8d3 Improve comment for DistributedAsyncInsertDirectoryQueue::initializeFilesFromDisk()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
e10fb142fd Fix race for distributed sends from disk
Before it was initialized from disk only on startup, but if some INSERT
can create the object before, then, it will lead to the situation when
it will not be initialized.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
b5434eac3b Rename StorageDistributedDirectoryMonitor to DistributedAsyncInsertDirectoryQueue
Since #44922 it is not a directory monitor anymore.

v2: Remove unused error codes
v3: Contains some header fixes due to conflicts with master
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
1c4659b8e7 Separate out Batch as DistributedAsyncInsertBatch (and also some helpers)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
33b13549ad Separate out DirectoryMonitorSource as DistributedAsyncInsertSource
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
325a7b2305 Separate out DistributedHeader as DistributedAsyncInsertHeader
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
22a39e29f7 Add a comment for StorageDistributedDirectoryMonitor::Batch::recovered
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
0c19a75a1c Add log message for batch restore
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
13a3e03f19 Introduce StorageDistributedDirectoryMonitor::Batch::{de,}serialize()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
f0a2efa630 Always manipulate with absolute file paths in DirectoryMonitor
Otherwise on batch restore we can get the difference in file paths.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
ef1e642e05 Add log message to StorageDistributedDirectoryMonitor::addAndSchedule()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
16646c0923 Rename DirectoryMonitor::current_batch_file to current_file
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-28 22:33:36 +01:00
Azat Khuzhin
3f892e52ab Revert "Revert "Merge pull request #44922 from azat/dist/async-INSERT-metrics""
This is the revert of revert since there will be follow up patches to
address the issues.

This reverts commit a55798626a.
2023-02-28 22:33:36 +01:00
Kruglov Pavel
66634cfd7c
Merge pull request #46618 from kitaisreal/map-field-to-string-fix
Map field to string fix
2023-02-28 20:29:40 +01:00
pufit
29296cb004
Merge pull request #46550 from ClickHouse/46231-systerm-server-settings
Implement `system.server_settings`
2023-02-28 11:23:15 -05:00
Kseniia Sumarokova
fc619d06ba
Merge pull request #40807 from maks-buren630501/master
Fix create materialized view with MaterializedPostgreSQL
2023-02-28 15:10:14 +01:00
Robert Schulze
2c0395b346
Merge pull request #46814 from ClickHouse/rs/search-refactoring
Cleanup string search code
2023-02-28 15:04:19 +01:00
Yakov Olkhovskiy
e49c249f73
Merge pull request #46684 from ClibMouse/setenv_fix
Fix openssl/s390x build (setenv + link order)
2023-02-28 09:03:43 -05:00
Anton Popov
7b9d54a2d9
Merge pull request #46995 from ClickHouse/function-range-allow-ipv4
Allow IPv4 in range()
2023-02-28 14:32:24 +01:00
Kruglov Pavel
545e5c0f5b
Merge pull request #46617 from Avogar/use-parquet-2
Change default parquet format version to v2_latest, add a setting to controle the version
2023-02-28 14:30:59 +01:00
alesapin
79bb297232
Merge pull request #46822 from hanfei1991/hanfei/refine-regexp-tree-dic
refine regexp tree dictionary
2023-02-28 12:34:22 +01:00
alesapin
812423804c
Merge pull request #46971 from Avogar/better-hints
Better exception messages when schema_inference_hints is ill-formatted
2023-02-28 12:31:27 +01:00
alesapin
712a8309c5
Merge pull request #46976 from ClickHouse/decrease-log-level
Decrease log level in "disks"
2023-02-28 12:28:30 +01:00
Yakov Olkhovskiy
f4a8b099de allow IPv4 in range() 2023-02-27 21:36:21 +00:00
kssenii
24ce30c41b Merge remote-tracking branch 'upstream/master' into maks-buren630501-master 2023-02-27 22:06:11 +01:00
Nikolai Kochetov
738551dbf1
Merge pull request #46624 from CheSema/detached_mt
add multitreading for StorageSystemDetachedParts
2023-02-27 20:54:28 +01:00
Maksim Kita
0764649c5d
Merge pull request #46632 from ClickHouse/analyzer-limit-settings-2
Analyzer - apply limit and offset settings - second attempt
2023-02-27 21:39:34 +03:00
Kruglov Pavel
36e65f5f84
Use versions vith dots 2023-02-27 19:00:40 +01:00
Alexey Milovidov
29da7fc965 Decrease log level in "disks" 2023-02-27 17:48:38 +01:00
Alexey Milovidov
866c318c12
Merge pull request #46947 from ClickHouse/evillique-patch-1
Another fix for clone() for ASTColumnMatchers
2023-02-27 19:28:30 +03:00
avogar
12a9ff36b2 Better exception messages when schema_inference_hints is ill-formatted 2023-02-27 15:20:56 +00:00
Robert Schulze
6f0709032d
Merge pull request #46921 from ClickHouse/rs/inv-idx-checksum
A better alternative to #46344
2023-02-27 14:44:44 +01:00
Robert Schulze
5c8edcc2e7
Merge pull request #46940 from ClickHouse/rs/sizes-of-arrays-dont-match
Typo: SIZES_OF_ARRAYS_DOESNT_MATCH --> SIZES_OF_ARRAYS_DONT_MATCH
2023-02-27 14:33:09 +01:00
Kruglov Pavel
443dedddca
Merge branch 'master' into use-parquet-2 2023-02-27 14:31:43 +01:00
Kruglov Pavel
e9078b402b
Merge pull request #46742 from Avogar/update-settings
Enable input_format_json_ignore_unknown_keys_in_named_tuple by default
2023-02-27 14:30:28 +01:00
Boris Kuschel
891cb1e225 Update src/CMakeLists.txt
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
2023-02-27 08:01:15 -05:00
bkuschel
97fc091b1f Fix link order for gnu ld 2023-02-27 08:01:15 -05:00
Robert Schulze
3880ac97af
Merge pull request #46875 from ClickHouse/rs/fix-incorrect-LIKE-to-substring-search-translation
Fix wrong results of some LIKE searches when the LIKE pattern contains quoted non-quotable characters
2023-02-27 12:34:07 +01:00
Nikolay Degterinsky
10c04d5a38
Fix clone() for ASTColumnMatchers 2023-02-27 12:26:36 +01:00
Sema Checherinda
29a0d766a0
Merge pull request #46886 from azat/async-metrics-intervals
Add new metrics to system.asynchronous_metrics
2023-02-27 11:25:38 +01:00
Vladimir C
6a4d0849f6
Merge pull request #46841 from azat/url-functions-fixes 2023-02-27 11:16:25 +01:00
Robert Schulze
4c9b9b362c
Replace dynamic_cast by typeid_cast 2023-02-27 10:01:21 +00:00
Robert Schulze
22d09caea2
SIZES_OF_ARRAYS_DOESN_MATCH --> SIZES_OF_ARRAYS_DONT_MATCH 2023-02-27 08:31:40 +00:00
Alexey Milovidov
cf4abcd988
Merge pull request #46915 from azat/tests/expect-fasttest
Fix some expect tests leftovers and enable them in fasttest
2023-02-27 07:34:29 +03:00
Alexey Milovidov
c32f579d67 Review from @tavplubix 2023-02-26 22:58:40 +01:00
Robert Schulze
cc0c0c6133
A better alternative to #46344
The (experimental) inverted index writes/reads files different from the
standard files written by the other skip indexes. The original problem
was that with database engine "ordinary", DROP TABLE of a table with
inverted index finds unknown files in persistence and complains. The
same will happen with engine "atomic" but deferred. As a hotfix, the
error was silenced by explicitly adding the four files created in a
specific test to the deletion code.

This PR tries a cleaner solution where all needed files are provided via
the normal checksum structure. One drawback remains which is that the
affected files were written earlier and we don't have their checksums
available. Therefore, the inverted index is currently excluded from
CHECK TABLE.

Minimal repro:
  SET allow_experimental_inverted_index = 1;
  DROP TABLE IF EXISTS tab;
  CREATE TABLE tab(s String, INDEX af(s) TYPE inverted(2)) ENGINE = MergeTree() ORDER BY s;
  INSERT INTO tab VALUES ('Alick a01');
  CHECK TABLE tab;
  DROP TABLE IF EXISTS tab;

  run ./clickhouse-test with --db-engine Ordinary
2023-02-26 21:06:38 +00:00
Alexey Milovidov
73aec86f5a Change exception message 2023-02-26 21:36:26 +01:00