Commit Graph

4971 Commits

Author SHA1 Message Date
Igor Nikonov
379113f8f1 Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-11-09 13:03:32 +00:00
Antonio Andelic
c92ae5a385 Add suport for AsyncMetrics in standalone Keeper 2022-11-09 13:46:03 +01:00
Alexander Tokmakov
1c6a617207
Merge branch 'master' into fix_intersecting_parts2 2022-11-09 14:38:18 +03:00
Suzy Wang
90250ea6ec s390x ip coding functions fixes 2022-11-08 21:12:47 -08:00
Igor Nikonov
345304abe0 Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-11-08 20:26:50 +00:00
Sergei Trifonov
8eedd1e046
Merge branch 'master' into disk-s3-throttler 2022-11-08 15:00:56 +01:00
Nikolay Degterinsky
2b286222f7
Merge branch 'master' into tuple-of-intervals 2022-11-08 00:15:35 +01:00
Nikolay Degterinsky
48cc1d8492
Update DateLUTImpl.h 2022-11-08 00:15:19 +01:00
Sergei Trifonov
6d3b96ee42
Merge branch 'master' into storage-system-moves 2022-11-07 21:31:27 +01:00
Alexander Tokmakov
9210e586d2 fix 2022-11-07 20:27:18 +01:00
Alexander Tokmakov
b8174a63a8 Merge branch 'master' into fix_intersecting_parts2 2022-11-07 20:26:36 +01:00
serxa
2daec0b45e S3 request per second rate throttling + refactoring 2022-11-07 18:05:40 +00:00
Vasily Nemkov
68dce47e72
Merge branch 'master' into ldap_fix_search_limit 2022-11-07 12:14:10 +04:00
Igor Nikonov
503649a638
Merge branch 'master' into igor/insert_zk_retries_retry 2022-11-06 22:55:13 +01:00
Alexey Milovidov
641f8576c6
Merge pull request #42003 from ClickHouse/write-progress-to-tty
Write progress directly to terminal
2022-11-05 16:51:37 +01:00
Igor Nikonov
859022660e Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-11-04 23:31:51 +00:00
Krzysztof Góralski
98cc4535f0 Failed queries metrics for Async Inserts 2022-11-03 22:26:24 +01:00
Nikolay Degterinsky
30ad1a6826
Merge branch 'master' into perf_experiment 2022-11-03 02:18:21 +03:00
Alexander Tokmakov
e67d05604c Merge branch 'master' into fix_intersecting_parts2 2022-11-02 19:30:27 +01:00
Vasily Nemkov
2be86ef5a7
Merge branch 'master' into ldap_fix_search_limit 2022-11-02 20:46:33 +04:00
Igor Nikonov
9a315b7899 Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-11-02 15:32:54 +00:00
Alexander Tokmakov
00c9e50ee3 fix race between INSERT and ALTER PARTITION 2022-11-02 16:25:26 +01:00
Yakov Olkhovskiy
16159cc7a9
Merge pull request #42412 from ClibMouse/formatIpv6_s390x_support
format ipv6 in s390x, endianess support
2022-11-01 12:02:44 -04:00
Alexey Milovidov
1b3ef58b51
Merge branch 'master' into formatIpv6_s390x_support 2022-10-31 23:20:53 +01:00
Igor Nikonov
9cc64a0fcc Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-10-31 18:21:21 +00:00
Márcio Martins
c33bd7794f
Merge branch 'master' into coercing-json-extract 2022-10-31 15:04:48 +01:00
Sergei Trifonov
8c67257a1c
Merge pull request #42665 from ClickHouse/token-bucket-throttler
Replace throttler algorithm by token bucket
2022-10-31 12:28:18 +01:00
Nikolai Kochetov
742d9af397
Merge pull request #42582 from azat/memory-tracker/fixes
Fix frequent memory drift message and clarify things in comments
2022-10-31 11:43:20 +01:00
vdimir
6a4247ca32
Merge branch 'master' into grace_hash_join 2022-10-31 09:54:37 +00:00
Vasily Nemkov
f805538105
Merge branch 'master' into ldap_fix_search_limit 2022-10-29 19:53:49 +04:00
Igor Nikonov
937dd44399 Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-10-28 15:09:23 +00:00
Sergei Trifonov
c948303fa0
Merge branch 'master' into token-bucket-throttler 2022-10-28 16:21:55 +02:00
Raúl Marín
ad91b625f7
Merge branch 'master' into perf_experiment 2022-10-28 16:00:53 +02:00
Sergei Trifonov
836595c7ae
Merge branch 'master' into storage-system-moves 2022-10-28 11:39:38 +02:00
Sergei Trifonov
eda264b492
Merge branch 'master' into token-bucket-throttler 2022-10-28 11:38:13 +02:00
Suzy Wang
6da80f4dcb
Merge branch 'master' into formatIpv6_s390x_support 2022-10-28 00:32:37 -04:00
Raúl Marín
59686c3796
Merge branch 'master' into perf_experiment 2022-10-28 00:51:56 +02:00
Igor Nikonov
2b56bc4394 Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-10-27 22:02:17 +00:00
Igor Nikonov
3682913172 Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-10-27 22:01:53 +00:00
Igor Nikonov
a4ce0e344a Fix build
src/Common/CaresPTRResolver.cpp:126:27
error: implicit conversion loses integer precision: 'int64_t' (aka
'long') to 'int' [-Werror,-Wshorten-64-to-32]
2022-10-27 21:11:41 +00:00
Sergei Trifonov
8892da3a4c
Merge branch 'master' into token-bucket-throttler 2022-10-27 22:40:59 +02:00
Jordi Villar
073d81c31f Use nfds_t instead 2022-10-27 20:36:42 +02:00
serxa
c4f25228f7 smaller burst to be closer to old behaviour 2022-10-27 17:18:50 +00:00
Jordi Villar
1fa24161e7 Minor fix implicit cast CaresPTRResolver 2022-10-27 18:34:37 +02:00
Alexander Tokmakov
86b81a2b6f
Merge pull request #42234 from arthurpassos/fix_ares_fd_process_race_condition
Fix c-ares crash
2022-10-27 17:17:22 +03:00
Raúl Marín
891484b462 Merge remote-tracking branch 'blessed/master' into perf_experiment 2022-10-27 13:17:07 +02:00
serxa
accf78f1ff fix the first add() call 2022-10-27 08:39:08 +00:00
Sergei Trifonov
ec1389cbe7
Update src/Common/Throttler.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
2022-10-27 10:30:00 +02:00
Márcio Martins
1ca230ff6d Allow coercing in JSONExtract* functions 2022-10-27 10:26:55 +02:00
Márcio Martins
40b572c23b Remove redundant default case in switch statement 2022-10-27 10:26:55 +02:00
Márcio Martins
0fc0e81c0c Add Element::type() to JSONParser 2022-10-27 10:26:55 +02:00
Suzy Wang
fd1281a34d
Merge branch 'master' into formatIpv6_s390x_support 2022-10-26 19:04:55 -04:00
Igor Nikonov
8435cba352 Merge remote-tracking branch 'origin/master' into igor/insert_zk_retries_retry 2022-10-26 17:35:47 +00:00
Azat Khuzhin
7b69a70e82 Fix frequent memory drift message and clarify things in comments
Somethine like:

    2022.09.28 06:33:34.001433 [ 3133669 ] {} <Trace> AsynchronousMetrics: MemoryTracking: was 562.20 MiB, peak 562.21 MiB, will set to 562.20 MiB (RSS), difference: -70.46 MiB
    2022.09.28 06:33:35.001639 [ 3133669 ] {} <Trace> AsynchronousMetrics: MemoryTracking: was 562.20 MiB, peak 562.21 MiB, will set to 562.20 MiB (RSS), difference: -70.45 MiB

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-26 17:38:37 +02:00
Azat Khuzhin
f5f6f1b593 Add profile events for jemalloc purge
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-26 17:38:36 +02:00
vdimir
506bf2d225
Merge branch 'master' into grace_hash_join 2022-10-26 12:25:50 +00:00
SmitaRKulkarni
5df138da82
Merge pull request #42376 from ClickHouse/36316_Support_glob_for_recursive_directory_traversal
Added ** glob support for recursive directory traversal to filesystem…
2022-10-26 11:49:20 +02:00
serxa
471b391ab2 fix 2022-10-26 00:00:40 +00:00
serxa
27599ab70c fix comment 2022-10-25 23:58:25 +00:00
serxa
fc223aa673 replace throttler algorithm by token bucket 2022-10-25 23:52:31 +00:00
Sergei Trifonov
34b43f8b4b
Merge branch 'master' into storage-system-moves 2022-10-25 22:56:45 +02:00
serxa
55a86bc2de Add active moves system table 2022-10-25 13:56:46 +00:00
Raúl Marín
6e0a9452e7 Merge remote-tracking branch 'blessed/master' into perf_experiment 2022-10-25 15:25:06 +02:00
Nikita Taranov
49f6692a2e
Adapt internal data structures to 512-bit era (#42564)
* impl

* update tests

* fix tests
2022-10-25 13:56:28 +02:00
Raúl Marín
0016bc2b73
Improve the time to recover keeper connections (#42541)
Co-authored-by: Nikita Mikhaylov <nikitamikhaylov@clickhouse.com>
Co-authored-by: robot-clickhouse <robot-clickhouse@clickhouse.com>
Co-authored-by: Alexey Milovidov <milovidov@clickhouse.com>
2022-10-25 13:26:29 +02:00
Alexey Milovidov
079ffa9827
Merge pull request #42353 from azat/build/musl-static
Make getResource() independent from the order of the sections
2022-10-25 05:57:22 +02:00
Guo Wangyang
4e294b9bfc
ColumnVector: re-enable AVX512_VBMI/AVX512_VBMI2 optimized filter and index (#41765)
* Revert "Merge pull request #41752 from ClickHouse/revert-revert-revert"

This reverts commit 7bb245720a, reversing
changes made to 78002dc248.

* Revert "Merge pull request #41797 from ClickHouse/revert-41247"

This reverts commit 69b13d9f31, reversing
changes made to 1719e000ea.

* AVX512VBMI::vectorIndexImpl: Fix heap buffer overflow when limit == 0

* use SIMD_ELEMENTS instead of SIMD_BYTES to avoid confusing
2022-10-24 23:11:46 +02:00
SmitaRKulkarni
96c8260230
Merge branch 'master' into 36316_Support_glob_for_recursive_directory_traversal 2022-10-24 18:34:19 +02:00
Alexey Milovidov
9bce072ec1
Merge branch 'master' into ldap_fix_search_limit 2022-10-24 17:19:05 +02:00
Nikolai Kochetov
aee7bb0d91
Merge pull request #42577 from ClickHouse/clean-thread-id
Clear thread::id when ThreadFromGlobalPool exits.
2022-10-24 12:03:28 +02:00
Alexey Milovidov
98f5f27947
Merge branch 'master' into ldap_fix_search_limit 2022-10-24 10:44:45 +02:00
Igor Nikonov
54013009d3 Code migration from #41734 to align diff and git blame.
Initial implementation was different and it changed the entire
ReplicatedMergeTreeSink::commitPart() which change history provided by git blame.
Then RetriesControl.retryLoop() was introduced later which significantly reduces
the diff since it's like while() used before.
So, check outing the current version will keep more original history in
git blame, which is useful here
2022-10-24 08:20:11 +00:00
Azat Khuzhin
27494aea63 Make getResource() independent from the order of the sections
It is possible for end section goes before begin section for some
resource, and this case it will not find it.

This is what happens here [1]:

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/41988/053fec3f451e97ac41b6c223d95013b758a9a330/fast_test.html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-24 07:10:45 +02:00
Alexey Milovidov
409fb28d0c Fix build 2022-10-23 01:52:30 +02:00
Alexey Milovidov
cd43595ea9 Merge branch 'master' into write-progress-to-tty 2022-10-23 01:41:17 +02:00
Azat Khuzhin
56bc85746f Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32
Conflicts:
- src/Interpreters/ProcessList.cpp
2022-10-22 16:49:08 +02:00
Nikolai Kochetov
06d46ca51b Clear thread::id when ThreadFromGlobalPool exits. 2022-10-22 13:28:22 +00:00
Nikolai Kochetov
5c32cd157d
Merge pull request #42362 from ClickHouse/fix-race-condition-finish-cancel
Fix data race in query finish/cancel
2022-10-22 14:58:42 +02:00
Azat Khuzhin
4eeb7337ed Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32
Conflicts:
- src/Common/intExp.h
- src/Functions/DateTimeTransforms.h
- src/Functions/FunctionsConversion.h
2022-10-21 22:51:56 +02:00
Azat Khuzhin
bbcdedb945 Revert changes of hash functions signatures and fix callers
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 22:40:17 +02:00
Azat Khuzhin
905a95e166 Review fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 22:40:13 +02:00
Alexey Milovidov
3beace607b
Merge pull request #42465 from ClickHouse/decimal-asan
Fix buffer overflow in Decimal scale
2022-10-21 21:55:20 +02:00
Arthur Passos
615b73773a removing unwanted files 2022-10-21 14:46:10 -03:00
Arthur Passos
e2fcd51c93 what 2022-10-21 14:43:08 -03:00
Arthur Passos
2c41c0357d Make CaresPTRResolver completely thread-safe 2022-10-21 14:32:48 -03:00
Alexander Tokmakov
7d11054134
Merge branch 'master' into fix_ares_fd_process_race_condition 2022-10-21 18:27:22 +03:00
Azat Khuzhin
784f7d988c Fix -Wshorten-64-to-32 in examples
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:43 +02:00
Azat Khuzhin
089bf39132 Fix -Wshorten-64-to-32 for musl
On musl uint_fast32_t is uint32_t, while for glibc it is unsigned long
long.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Robert Schulze
2d448c139c
Merge pull request #42308 from arenadata/ADQM-584
Add support of Date32 arguments for date_diff function
2022-10-21 13:18:44 +02:00
Nikita Taranov
abd585a38a
Increase threshold for using physical cores (#42503) 2022-10-21 12:52:46 +02:00
Nikolai Kochetov
d09a5e8fd7 Revert "Attempt to fix abort from parallel parsing (#42496)"
This reverts commit 4d703b792c.
2022-10-20 21:46:26 +02:00
Arthur Passos
50f9acb221
Merge branch 'master' into fix_ares_fd_process_race_condition 2022-10-20 13:35:58 -03:00
Nikita Mikhaylov
4d703b792c
Attempt to fix abort from parallel parsing (#42496) 2022-10-20 17:13:18 +02:00
Vasily Nemkov
05cde705b0 Addressed issues mentioned in PR
Stronger hashing for LDAP parameters
Fixed SipHash double finalize()
Simplified checks on search_limit
2022-10-20 16:38:41 +04:00
Vasily Nemkov
1ed7ad57d9 fix LDAP in case of many roles on user
- Raised default value of search_limit to 256
- Added option to change that to arbitrary value
- using SipHash for computing hash of LDAP server parameters
- other minor changes
2022-10-20 16:38:38 +04:00
Roman Vasin
4db28d0bd6 Add toStableRelativeHourNum to gtest_DateLUTImpl.cpp 2022-10-19 14:01:26 +00:00
Alexey Milovidov
148275ed64 Fix buffer overflow in Decimal scale 2022-10-19 04:15:26 +02:00
Roman Vasin
d9fcd91875 Add toStableRelativeHourNum 2022-10-18 09:07:12 +00:00
Suzy Wang
c8642514d0 format ipv6 in s390x, endianess support 2022-10-17 12:02:28 -07:00
vdimir
adb63a5583
Merge branch 'master' into grace_hash_join 2022-10-17 12:32:56 +00:00
Raúl Marín
be932f49d2 Merge remote-tracking branch 'blessed/master' into perf_experiment 2022-10-17 12:07:31 +02:00
Smita Kulkarni
91433e5b9c Added ** glob support for recursive directory traversal to filesystem and S3.
Implementation:
* Updated parseGlob to not add ‘/‘ restriction when ** is used.
* Updated S3 & filesystem to fetch files and not use regex match if glob is **.
Testing:
* Added a test for filesystem tests/queries/0_stateless/02459_glob_for_recursive_directory_traversal.sh
2022-10-17 09:04:25 +02:00
Alexey Milovidov
f88ed8195b Fix trash 2022-10-17 04:21:08 +02:00
Vitaly Baranov
91c438eebe
Merge pull request #42263 from vitlibar/refactor-udf
Refactor the implementation of user-defined functions
2022-10-15 12:33:10 +02:00
Arthur Passos
78202f9660
Merge branch 'master' into fix_ares_fd_process_race_condition 2022-10-14 12:56:39 -03:00
Raúl Marín
227af9a074 Optimizations around ThreadStatus 2022-10-13 21:49:21 +02:00
Arthur Passos
91560dd607 working on style 2022-10-12 21:28:32 -03:00
Arthur Passos
f588830e24 working on style 2022-10-12 20:35:17 -03:00
Arthur Passos
72ba210b24 working on style 2022-10-12 20:23:29 -03:00
Arthur Passos
d98eac11eb remove mutex declaration 2022-10-12 17:47:56 -03:00
Arthur Passos
9abf13bf78 Use poll instead of select for c-ares 2022-10-12 13:56:00 -03:00
Vitaly Baranov
9cb2052c7f Consider Poco::Net::HostNotFoundException as ZCONNECTIONLOSS. 2022-10-12 15:52:55 +02:00
vdimir
0178307c27 Followup for TemporaryDataOnDisk 2022-10-12 15:25:23 +02:00
Arthur Passos
6dae76ff88 add mutex include for release builds 2022-10-11 12:47:27 -03:00
Arthur Passos
0a26afd1c8 Add mutex around ares fd processing 2022-10-10 18:54:35 -03:00
Alexey Milovidov
a9cbdeec24
Merge pull request #42180 from ClickHouse/unique-thread-ids
Make thread ids in the process list and query_log unique to avoid waste
2022-10-08 20:06:02 +03:00
Alexey Milovidov
ec5a32f534 Make thread_ids unique 2022-10-08 02:05:36 +02:00
Alexander Tokmakov
4175f8cde6 abort instead of __builtin_unreachable in debug builds 2022-10-07 21:49:08 +02:00
vdimir
5a7c493559
Merge branch 'master' into pr/BigRedEye/38191 2022-10-06 14:43:35 +00:00
Robert Schulze
78be400ac0
Merge remote-tracking branch 'origin/master' into generated-file-cleanup 2022-10-06 12:22:43 +00:00
Anton Popov
aabec50988
Merge pull request #42040 from CurtizJ/async-inserts-log
Add system table `asynchronous_insert_log`
2022-10-06 13:14:41 +02:00
Robert Schulze
da5a2e2db0
Merge remote-tracking branch 'origin/master' into generated-file-cleanup
Physical merge conflicts:
- src/Common/ZooKeeper/ZooKeeperImpl.cpp
- src/Core/config_core.h.in
- src/Functions/FunctionsAES.h
- src/Functions/config_functions.h.in
- src/configure_config.cmake

Logical merge conflicts:
- Functions/tryDecrypt.cpp
2022-10-06 08:43:25 +00:00
vdimir
ff55c369bc
Merge branch 'tmp-data-followup' 2022-10-05 18:10:05 +00:00
vdimir
ccd29e172f
Followup for TemporaryDataOnDisk 2022-10-05 16:42:27 +00:00
Roman Vasin
b54fb83cc5
Merge branch 'master' into ADQM-599-B 2022-10-05 15:50:38 +03:00
Alexey Milovidov
eef40ce884 Some attempt 2022-10-05 02:29:52 +02:00
Anton Popov
121ef74b17 slightly better 2022-10-04 14:19:05 +00:00
Roman Vasin
4a5c3e5a6e Fix toLastDayOfMonth and other functions 2022-10-04 09:09:59 +00:00
Anton Popov
148995894f add system table asynchronous_inserts_log 2022-10-03 21:35:55 +00:00
Alexander Tokmakov
00914a174d
Merge pull request #41410 from ClickHouse/keeper-multiread
Add MultiRead support in Keeper and internal ZK client
2022-10-03 14:17:57 +03:00
Robert Schulze
db5ef7b3cb
Merge branch 'master' into generated-file-cleanup 2022-10-02 23:13:18 +02:00
Robert Schulze
8e727d4fbc
Merge pull request #41910 from arenadata/ADQM-583
Improve enable_extended_results_for_datetime_functions option to return results of type DateTime64
2022-10-02 20:46:51 +02:00
Alexey Milovidov
90b9afab21 Remove useless code 2022-10-02 01:50:36 +02:00
Alexey Milovidov
5d710e21f1 Render progress directly in tty 2022-10-01 23:19:36 +02:00
vdimir
b120ad1452
Use TemporaryDataOnDisk for grace hash join 2022-09-30 11:07:49 +00:00
vdimir
7ebc297f4c
Merge branch 'master' into pr/BigRedEye/38191 2022-09-30 09:40:47 +00:00
Robert Schulze
cc92a2d174
Merge branch 'master' into generated-file-cleanup 2022-09-30 09:56:31 +02:00
Roman Vasin
45414b251d Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-583 2022-09-29 17:02:49 +00:00
Sergei Trifonov
61e12fc54a
Merge branch 'master' into io-scheduler 2022-09-29 13:48:14 +02:00
Antonio Andelic
94f1fe39bb Add support for exists in multiread 2022-09-29 10:39:33 +00:00
Robert Schulze
6381631836
Merge pull request #41824 from ClickHouse/tryBase58
Add function tryBase58Decode()
2022-09-29 12:38:58 +02:00
Antonio Andelic
0056eebb08 Cleanup 2022-09-29 10:10:49 +00:00
Antonio Andelic
fcc54104a4 Define methods for multi read requests 2022-09-29 09:19:47 +00:00
Antonio Andelic
bcefa6e62a Use chassert 2022-09-29 07:06:18 +00:00
Antonio Andelic
3109ce51c6 Merge branch 'master' into keeper-multiread 2022-09-29 06:50:49 +00:00
Sergei Trifonov
8edac7eba1
Merge branch 'master' into io-scheduler 2022-09-28 22:17:17 +02:00
Robert Schulze
fd86829824
Consolidate config_core.h into config.h
Less duplication, less confusion ...
2022-09-28 13:31:57 +00:00
Robert Schulze
09c62f6728
Consolidate config_formats.h into config.h
Less duplication, less confusion ...
2022-09-28 12:59:05 +00:00
Robert Schulze
0753fd1c77
Consolidate config_functions.h into config.h
Less duplication, less confusion ...
2022-09-28 12:48:26 +00:00
Robert Schulze
6d70b4a1f6
Generate config_version.h into ${CONFIG_INCLUDE_PATH}
This makes the target location consistent with other auto-generated
files like config_formats.h, config_core.h, and config_functions.h and
simplifies the build of clickhouse_common.
2022-09-28 12:48:26 +00:00
Robert Schulze
78fc36ca49
Generate config.h into ${CONFIG_INCLUDE_PATH}
This makes the target location consistent with other auto-generated
files like config_formats.h, config_core.h, and config_functions.h and
simplifies the build of clickhouse_common.
2022-09-28 12:48:26 +00:00
Robert Schulze
1885bb0524
Make comment consistent accross generated files 2022-09-28 08:11:09 +00:00
Alexey Milovidov
be6689ef08
Merge pull request #41372 from HarryLeeIBM/hlee-s390x-siphash
Another fix for SipHash Endian issue on s390x
2022-09-28 01:05:05 +03:00
Antonio Andelic
d0457addbd Support filtered list 2022-09-27 15:02:26 +00:00
serxa
b057d07977 IO scheduling subsystem 2022-09-27 13:26:41 +00:00
Antonio Andelic
265c8b3d26 Merge branch 'master' into keeper-multiread 2022-09-27 12:37:22 +00:00
Antonio Andelic
7a9afc4bdd Fix zookeeper_log 2022-09-27 12:36:59 +00:00
Alexander Tokmakov
3d4a5a493b
Merge pull request #41484 from FrankChen021/on_cluster_dll
Add OpenTelemetry support to ON CLUSTER DDL
2022-09-27 15:15:52 +03:00
Robert Schulze
aa7e62ad5f
Add functio ntryBase58Decode()
- makes it consistent with tryBase64Decode(), follow-up to #39292

- additionally the following minor changes:

  - rename Common/base58.h|cpp to Common/Base58.h|cpp for constency with
    Common/Base64.h|cpp

  - check that (encode|decode|tryDecode)Base64() gets just one argument
2022-09-27 10:18:36 +00:00
Antonio Andelic
937d534cd4 Add support for simple list 2022-09-26 08:05:02 +00:00
Antonio Andelic
f833366555 Merge branch 'master' into keeper-multiread 2022-09-26 07:16:45 +00:00
Alexey Milovidov
e3a6f2381b Revert "Merge pull request #40033 from ClickHouse/reenable-avx512-vbmi-columnvector-filter"
This reverts commit 70f63d2aae, reversing
changes made to a0693c3a84.
2022-09-25 17:03:52 +02:00
Nikita Mikhaylov
e897816572
Evict stale DNS entries from cache in case of network errors (#41707) 2022-09-25 14:06:13 +02:00
Nikita Mikhaylov
dbcba1490c
Try to make MergeTreeRestartingThread more reactive in case of expired sessions (#41092) 2022-09-23 14:40:04 +02:00
Frank Chen
2344e0738e Keep compatibility during upgrading 2022-09-23 11:32:21 +08:00
Frank Chen
40f9e0b69a Address review comments
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-23 10:08:42 +08:00
Roman Vasin
cdd20241bf Finish toStartOfDay; fix toStartOfMinute 2022-09-22 13:16:46 +00:00
Alexey Milovidov
2c0eb994db Fix build after merge 2022-09-22 06:53:33 +02:00
Alexey Milovidov
45afacdae4
Merge pull request #41186 from ClickHouse/fix-three-fourth-of-trash
Fix more than half of the trash
2022-09-22 07:28:26 +03:00
Frank Chen
99c74d182c
Merge branch 'master' into on_cluster_dll 2022-09-22 09:58:10 +08:00
Nikita Taranov
100c055510
Prefetching in aggregation (#39304)
* impl

* stash

* clean up

* do not apply when HT is small

* make branch static

* also in merge

* do not hardcode look ahead value

* fix

* apply to methods with cheap key calculation

* more tests

* silence tidy

* fix build

* support HashMethodKeysFixed

* apply during merge only for cheap

* stash

* fixes

* rename method

* add feature flag

* cache prefetch threshold value

* fix

* fix

* Update HashMap.h

* fix typo

* 256KB as default l2 size

Co-authored-by: Alexey Milovidov <milovidov@clickhouse.com>
2022-09-21 18:59:07 +02:00
HarryLeeIBM
77153533ac Fix endian issue in integer hex string conversion 2022-09-21 09:21:16 -04:00
Nikolai Kochetov
9e1bb19559
Purge jemalloc arenas in case of high memory usage. (#40277)
* Purge jemalloc arenas in case of high memory usage.

* Purge jemalloc arenas in case of high memory usage.

* Get RSS before jemalloc counters. Try to avoid negative RSS.

* Try to avoid negative RSS.

* muzzy -> dirty

* Another fix.

* Update MemoryTracker.cpp

* Wait for purged memory.

* Revert "Wait for purged memory."

This reverts commit 53a2621a2d.
2022-09-20 23:56:10 +02:00
Alexey Milovidov
45bd3cfc30 Merge branch 'master' into fix-three-fourth-of-trash 2022-09-20 21:27:41 +02:00
Alexey Milovidov
f55a67c7b2 Fix build 2022-09-20 21:27:18 +02:00
Alexey Milovidov
133318d8bd
Merge branch 'master' into hlee-s390x-siphash 2022-09-20 06:10:57 +03:00
Sergei Trifonov
cf2db48c29
Merge pull request #40631 from ClickHouse/readonly-settings-allow
Allow to modify constrained settings in readonly mode
2022-09-20 02:18:14 +02:00
Sergei Trifonov
7902922ae4
Merge branch 'master' into readonly-settings-allow 2022-09-19 21:00:12 +02:00
serxa
7a1d4a404a add DiskS3* profile events per S3 API calls 2022-09-19 18:10:47 +00:00
serxa
f8aa738511 more conventional profile events names 2022-09-19 17:23:22 +00:00
serxa
6ed53585ab rearrange and fix profile event descriptions 2022-09-19 17:03:48 +00:00
Sergei Trifonov
ff2e1ff8d8
Merge branch 'master' into support_s3_api_event_metrics 2022-09-19 14:35:45 +02:00
Sergei Trifonov
f7a1ed3141
Merge branch 'master' into readonly-settings-allow 2022-09-19 12:52:36 +02:00
Alexey Milovidov
000b6ac81c Fix error 2022-09-19 09:30:48 +02:00
Alexey Milovidov
730655d4fd Fix 8/9 of trash 2022-09-19 08:53:20 +02:00
Alexey Milovidov
91baedf03a Fix 6/7 of trash 2022-09-19 08:53:20 +02:00
Alexey Milovidov
ab4db2d0c4 Fix 5/6 of trash 2022-09-19 08:50:53 +02:00
Alexey Milovidov
84f42e0874 Fix 3/4 of trash 2022-09-19 08:50:53 +02:00
Alexey Milovidov
d4b9fe41be
Merge pull request #41457 from ClickHouse/remove-trash-5
Remove trash from Field
2022-09-19 06:36:48 +03:00
Frank Chen
2ae43bb4e8 Add test case
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-19 11:18:35 +08:00
Alexey Milovidov
09ae1a4bf4
Merge branch 'master' into hlee-s390x-siphash 2022-09-18 11:09:02 +03:00
Alexey Milovidov
7e6da853cd Merge branch 'master' into pod-array-overflow 2022-09-18 09:24:23 +02:00
Alexey Milovidov
791de6592b Remove trash from Field 2022-09-18 05:16:08 +02:00
HarryLeeIBM
f3e8738145 Fixed issues in code review 2022-09-17 19:48:08 -07:00
Alexey Milovidov
dc76677eb2
Merge pull request #41440 from ClickHouse/remove-cruft
Remove cruft about gcc
2022-09-18 03:15:26 +03:00
Alexey Milovidov
6c74c54cb5 Merge branch 'master' into pod-array-overflow 2022-09-18 01:24:52 +02:00
Alexey Milovidov
9ca4e2ec7c Fix overflow in PODArray 2022-09-17 22:26:39 +02:00
Alexey Milovidov
f4a48cd4d6 Remove cruft 2022-09-17 22:16:31 +02:00
Alexey Milovidov
35cce03125 Remove dlopen 2022-09-17 03:02:34 +02:00
Alexey Milovidov
31ebd34f5b
Merge pull request #41193 from azat/DWARF-5-parser-v3
Add support for DWARF-5 (without emitting them in binaries)
2022-09-17 02:58:02 +03:00
Antonio Andelic
81f7cf3ca6 Add support for MultiRead in Keeper 2022-09-16 12:00:35 +00:00
Robert Schulze
b32b02d844
Merge pull request #40897 from ClickHouse/catboost-bridge-resurrected
Move CatBoost evaluation into clickhouse-library-bridge
2022-09-16 13:12:09 +02:00
Antonio Andelic
5662e0050c Define client for multi read 2022-09-16 09:55:02 +00:00
Alexey Milovidov
da01982652
Merge pull request #41046 from azat/build/llvm-15
Switch to llvm/clang 15
2022-09-16 07:31:06 +03:00
HarryLeeIBM
d62ba01e93 Fix SipHash Endian issue for s390x 2022-09-15 06:25:23 -07:00
serxa
4971c1f04d review fixes 2022-09-15 11:34:14 +00:00
Frank Chen
f576d8191c Merge branch 'master' into on_cluster_dll 2022-09-15 18:05:36 +08:00
Robert Schulze
b64af5989e
Merge branch 'master' into opentelemetry_stress 2022-09-15 09:43:11 +02:00
Frank Chen
77d0971efa Serialize tracing context 2022-09-15 14:46:55 +08:00
mateng0915
5badb1b186 resolve the review comments 2022-09-14 19:19:40 +08:00
teng.ma
a85c917488 fix master conflict 2022-09-14 19:18:31 +08:00
teng.ma
ebea9f9359 Feature: Support Event Tracing when calling Aws S3 API
Description:
============
In  Computing && Storage Architecture,  using S3 as remote / Shared storage, the Method to access S3 is using AWS S3 API
There is a gap between ClickHouse DB with Ozone Operation
In ClickHouse, operation is SQL and background task
In S3 , the operation should be AWS S3 API
And one sql maybe can mapped to multiple  API

Solution:
=========
Added Calling API as event into system.events table
2022-09-14 19:18:31 +08:00
Robert Schulze
e8e6dddc76
Merge pull request #41034 from FrankChen021/distributed
Improve the observability of INSERT on distributed table
2022-09-13 20:55:11 +02:00
Antonio Andelic
baf7255cff
Merge pull request #39976 from ClickHouse/keeper-storage
KeeperMap storage engine
2022-09-13 14:15:09 +02:00
Kseniia Sumarokova
b2c9c04c7b
Merge pull request #40821 from kssenii/improve-marks-cache-loading
Allow to load marks in threadpool in advance
2022-09-13 12:31:58 +02:00
Frank Chen
7303ae1796 Make sure span holder will be destructed only once 2022-09-13 18:27:29 +08:00
Robert Schulze
fac1be9700
chore: restore SYSTEM RELOAD MODEL(S) and moniting view SYSTEM.MODELS
- This commit restores statements "SYSTEM RELOAD MODEL(S)" which provide
  a mechanism to update a model explicitly. It also saves potentially
  unnecessary reloads of a model from disk after it's initial load.

  To keep the complexity low, the semantics of "SYSTEM RELOAD MODEL(S)
  was changed from eager to lazy. This means that both statements
  previously immedately reloaded the specified/all models, whereas now
  the statements only trigger an unload and the first call to
  catboostEvaluate() does the actual load.

- Monitoring view SYSTEM.MODELS is also restored but with some obsolete
  fields removed. The view was not documented in the past and for now it
  remains undocumented. The commit is thus not considered a breach of
  ClickHouse's public interface.
2022-09-12 19:33:02 +00:00
Sergei Trifonov
c31818260f renames and refactoring 2022-09-12 21:03:06 +02:00
Frank Chen
20191932df Fix style
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-13 00:41:05 +08:00
Frank Chen
7e1f2901da Fix
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-13 00:06:17 +08:00
Sergei Trifonov
fe88a7991d
Merge branch 'master' into readonly-settings-allow 2022-09-12 16:20:40 +02:00
Frank Chen
ebaa24ecae Fix flaky tests
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-12 22:15:30 +08:00
Antonio Andelic
1cd43d8e5c Merge branch 'master' into keeper-storage 2022-09-12 13:42:51 +00:00
Azat Khuzhin
7e130aeb69 Add support for DWARF-5 (without emitting them in binaries)
ClickHouse changes to the folly parser:
- use camel_case
- add NOLINT
- avoid using folly:: (use std:: instead)
- avoid using boost:: (use std:: instead)

But note, now it has not been enabled by default (like it was
initially), because you may need recent debugger to support DWARF-5
correctly, and to make debugging easier, let's do this later.

A good example is gdb 10, even though it looks like it should support
it, it still produce some errors, like here [1]:

    Dwarf Error: DW_FORM_strx1 found in non-DWO CU [in module /usr/bin/clickhouse]

  [1]: https://github.com/ClickHouse/ClickHouse/pull/40772#issuecomment-1236331323

And not only it complains, apparently it can "activate" SDT probes
(replace "nop" with "int3"), and I believe this is what happens here
[2].

  [2]: https://github.com/ClickHouse/ClickHouse/pull/41063#issuecomment-1242992314

There you got int3 in the case when ClickHouse got SIGTRAP:

<details>

```
    0x7f494705e093 <+1139>: jne    0x7f494705e450            ; <+2096> [inlined] update_tls_slotinfo at dl-open.c:732
    0x7f494705e099 <+1145>: testl  %r13d, %r13d
    0x7f494705e09c <+1148>: je     0x7f494705e09f            ; <+1151> at dl-open.c:744:6
    0x7f494705e09e <+1150>: int3
->  0x7f494705e09f <+1151>: movl   -0x54(%rbp), %eax
    0x7f494705e0a2 <+1154>: testl  %eax, %eax
    0x7f494705e0a4 <+1156>: jne    0x7f494705e410            ; <+2032> at dl-open.c:745:5

But if I repeat the query it does not:

    0x7ffff7fe5093 <+1139>: jne    0x7ffff7fe5450            ; <+2096> [inlined] update_tls_slotinfo at dl-open.c:732
    0x7ffff7fe5099 <+1145>: testl  %r13d, %r13d
    0x7ffff7fe509c <+1148>: je     0x7ffff7fe509f            ; <+1151> at dl-open.c:744:6
    0x7ffff7fe509e <+1150>: nop
->  0x7ffff7fe509f <+1151>: movl   -0x54(%rbp), %eax
    0x7ffff7fe50a2 <+1154>: testl  %eax, %eax
    0x7ffff7fe50a4 <+1156>: jne    0x7ffff7fe5410            ; <+2032> at dl-open.c:745:5
```

</details>

Test command was:

    clickhouse local --stacktrace -q "select * from file('data.capnp', 'CapnProto', 'val1 char') settings format_schema='nonexist:Message'

*P.S. I did this, because I have libraries compiled with DWARF5 (i.e. glibc), and dwarf parser simply fails on my dev env.*

Refs: 490b287ca3
(cherry picked from commit ee5696bb32)
(cherry picked from commit e03870bc8b)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-11 21:06:14 +02:00
Alexey Milovidov
8b5328f7e5 Merge branch 'master' into fix-trash-base58 2022-09-11 20:43:54 +02:00
Alexey Milovidov
3e6c4e3f16 Fix clang-tidy 2022-09-11 20:43:36 +02:00
Alexey Milovidov
9a0892c40c
Merge pull request #41171 from ClickHouse/fix-half-of-trash
Fix half of trash
2022-09-11 21:40:22 +03:00
kssenii
b7d751b782 Merge remote-tracking branch 'upstream/master' into improve-marks-cache-loading 2022-09-11 13:23:30 +02:00
Alexey Milovidov
5802c2fdd2
Merge pull request #40713 from ClickHouse/remove-useless-line
Remove one line from XML, because we do not care
2022-09-11 09:53:30 +03:00
Alexey Milovidov
0896e6b9b6
Merge pull request #41183 from ClickHouse/fix-parallel-hash-join-for-floats
Better parallel hash JOIN for floats
2022-09-11 09:13:57 +03:00
Alexey Milovidov
e0a9ae0496 Fix base58 trash 2022-09-11 08:09:14 +02:00
Alexey Milovidov
3d8a2130cf Continue fixing the trash 2022-09-11 06:31:15 +02:00
Alexey Milovidov
9fbd361a2b Merge branch 'master' into fix-trash-base58 2022-09-11 06:23:01 +02:00
Alexey Milovidov
7f1e7b5967 Merge branch 'master' into fix-half-of-trash 2022-09-11 06:20:47 +02:00
Alexey Milovidov
512fb998f1 Fix ridiculous trash in Base58 2022-09-11 03:54:40 +02:00
Alexey Milovidov
cc38ac3764 Better parallel hash JOIN for floats 2022-09-11 03:04:44 +02:00
Alexey Milovidov
ae6c74a916 Merge branch 'master' into fix-half-of-trash 2022-09-11 02:30:56 +02:00
Alexey Milovidov
b75d56ad9b Merge branch 'master' into remove-some-methods 2022-09-11 01:55:02 +02:00
Alexey Milovidov
91338ea771
Merge branch 'master' into remove-useless-line 2022-09-11 02:03:39 +03:00
Azat Khuzhin
4e3135383b Fix clang-tidy warnings (from clang-15)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-10 21:38:35 +02:00
Azat Khuzhin
e0a8f19cfb Fix -Wzero-as-null-pointer-constant in MemoryStatisticsOS::get for FreeBSD
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-10 21:38:35 +02:00
Alexey Milovidov
871ee15a9c
Merge pull request #40953 from ClibMouse/sensitive_data_masker_unittest_issue
Rearrange sensitive data masker unit test
2022-09-10 20:03:30 +03:00
Alexey Milovidov
61278c81e4 Merge branch 'master' into remove-useless-line 2022-09-10 05:07:10 +02:00
Alexey Milovidov
fd235919aa Remove some methods 2022-09-10 05:04:40 +02:00
Suzy Wang
d60340eb40
Merge branch 'master' into sensitive_data_masker_unittest_issue 2022-09-09 22:59:50 -04:00
Alexey Milovidov
fa62c7e982 Fix half of trash 2022-09-10 04:08:16 +02:00
Azat Khuzhin
8c5583d7a5 Fix stack-use-after-return in GetPriorityForLoadBalancing::getPriorityFunc()
clang-15 reports [1]:

<details>

<summary>ASan report</summary>

```
    ==1==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f1d04c4eb20 at pc 0x000031c4803c bp 0x7f1d05e19a00 sp 0x7f1d05e199f8
    READ of size 8 at 0x7f1d04c4eb20 thread T200 (QueryPullPipeEx)
        #0 0x31c4803b in DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3::operator()(unsigned long) const build_docker/../src/Common/GetPriorityForLoadBalancing.cpp:42:40
        #1 0x31c4803b in decltype(static_cast<DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3&>(fp)(static_cast<unsigned long>(fp0))) std::__1::__invoke<DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3&, unsigned long>(DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3&, unsigned long&&) build_docker/../contrib/libcxx/include/type_traits:3640:23
        #2 0x31c4803b in unsigned long std::__1::__invoke_void_return_wrapper<unsigned long, false>::__call<DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3&, unsigned long>(DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3&, unsigned long&&) build_docker/../contrib/libcxx/include/__functional/invoke.h:30:16
        #3 0x31c4803b in std::__1::__function::__default_alloc_func<DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3, unsigned long (unsigned long)>::operator()(unsigned long&&) build_docker/../contrib/libcxx/include/__functional/function.h:230:12
        #4 0x31c4803b in unsigned long std::__1::__function::__policy_invoker<unsigned long (unsigned long)>::__call_impl<std::__1::__function::__default_alloc_func<DB::GetPriorityForLoadBalancing::getPriorityFunc(DB::LoadBalancing, unsigned long, unsigned long) const::$_3, unsigned long (unsigned long)>>(std::__1::__function::__policy_storage const*, unsigned long) build_docker/../contrib/libcxx/include/__functional/function.h:711:16
        #5 0x31c38b07 in std::__1::__function::__policy_func<unsigned long (unsigned long)>::operator()(unsigned long&&) const build_docker/../contrib/libcxx/include/__functional/function.h:843:16
        #6 0x31c38b07 in std::__1::function<unsigned long (unsigned long)>::operator()(unsigned long) const build_docker/../contrib/libcxx/include/__functional/function.h:1184:12
        #7 0x31c38b07 in PoolWithFailoverBase<DB::IConnectionPool>::getShuffledPools(unsigned long, std::__1::function<unsigned long (unsigned long)> const&) build_docker/../src/Common/PoolWithFailoverBase.h:174:39

      This frame has 2 object(s):
        [32, 40) 'pool_size.addr' <== Memory access at offset 32 is inside this variable
        [64, 88) 'ref.tmp' (line 18)
```

</details>

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/41046/adea92f847373d1fcfd733d8979c63024f9b80bf/integration_tests__asan__[1/3].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-09 20:06:48 +02:00
Antonio Andelic
32483aeec8 Merge branch 'master' into keeper-storage 2022-09-09 12:24:01 +00:00
Antonio Andelic
8ae7fb14b3
Merge pull request #40918 from ClickHouse/fix-keeper-system-path-check
Fix check for Keeper system path modification
2022-09-09 09:12:49 +02:00
Alexey Milovidov
af8ed9c166
Merge branch 'master' into sensitive_data_masker_unittest_issue 2022-09-09 00:05:53 +03:00
Sergei Trifonov
f92b6a6176
Merge branch 'master' into readonly-settings-allow 2022-09-08 17:44:32 +02:00
Sergei Trifonov
62541ab764 fix more tests and clang tidy build 2022-09-08 17:43:09 +02:00
Antonio Andelic
3502718a2c Less complications 2022-09-08 13:52:14 +00:00
Robert Schulze
60f9f6855d
feat: implement catboost in library-bridge
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
2022-09-08 09:01:32 +00:00
Antonio Andelic
09c0bf2931 Add unit tests for match path 2022-09-08 08:16:38 +00:00
Antonio Andelic
5d837e4f41 Merge branch 'master' into fix-keeper-system-path-check 2022-09-08 07:41:04 +00:00
Robert Schulze
68808858a5
Merge pull request #41050 from FrankChen021/exception_safe
Fix failed stress test (OpenTelemetry)
2022-09-08 09:19:54 +02:00
Suzy Wang
61b2e1c32c
Merge branch 'master' into sensitive_data_masker_unittest_issue 2022-09-07 16:49:03 -04:00
Kseniia Sumarokova
a270eeef91
Merge pull request #41008 from kssenii/refactor-merge-tree-read
Small refactoring around merge tree readers (get rid of data part ptr)
2022-09-07 18:27:33 +02:00
Dmitry Novik
499e479892
Merge pull request #40873 from azat/build/fix-debug-symbols-quirk
Fix debug symbols
2022-09-07 17:31:35 +02:00
Suzy Wang
e0b8f26839
Merge branch 'master' into sensitive_data_masker_unittest_issue 2022-09-07 10:38:21 -04:00
Vitaly Baranov
31ed722572
Merge pull request #41044 from vitlibar/more-conventional-conversion-yaml-to-xmk
More conventional conversion yaml to xml
2022-09-07 13:46:32 +02:00
vdimir
6d4b6c452a
Merge branch 'master' into grace_hash_join 2022-09-07 08:00:14 +00:00
Frank Chen
fc05b05be3 Fix style and typo
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-07 15:14:43 +08:00
Frank Chen
de8f6bdce7 More safe
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-07 13:39:12 +08:00
Sergei Trifonov
35524d0175 typo 2022-09-06 20:51:33 +02:00
Sergei Trifonov
77ee4c04aa fix stateless tests 2022-09-06 20:28:50 +02:00
Vitaly Baranov
63e992d52d Edit test configs. 2022-09-06 17:09:26 +02:00
Frank Chen
6ced4131ca exception safe
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-09-06 22:11:47 +08:00
Kseniia Sumarokova
3558361a05
Merge branch 'master' into refactor-merge-tree-read 2022-09-06 16:00:43 +02:00
Suzy Wang
cc88679a52
Merge branch 'master' into sensitive_data_masker_unittest_issue 2022-09-06 09:36:53 -04:00
Vitaly Baranov
6b55f4dd68 Use pretty-print to output preprocessed configs in readable form. 2022-09-06 15:01:47 +02:00
Vitaly Baranov
e9b75deeba Make conversion YAML->XML more conventional. 2022-09-06 15:01:41 +02:00
Sergei Trifonov
f77809ddbc
Merge pull request #40900 from ClickHouse/s3-detailed-metrics
S3 detailed metrics
2022-09-06 13:20:57 +02:00
Alexey Milovidov
940a53e519
Merge pull request #40984 from Lucky-Chang/typo_fix
Fix some typos and clang-tidy warnings
2022-09-06 02:37:50 +03:00
kssenii
83514fa2ef Refactor 2022-09-05 20:08:22 +02:00
Sergei Trifonov
1c247308f1
Merge branch 'master' into s3-detailed-metrics 2022-09-05 15:55:41 +02:00
Alexander Tokmakov
abffd4595e
Merge branch 'master' into zookeeper_client_fault_injection 2022-09-05 15:03:26 +03:00
Antonio Andelic
e07539d1b9 Merge branch 'master' into keeper-storage 2022-09-05 09:54:13 +00:00
Luck-Chang
0800c0fd4c fix some typos 2022-09-05 14:09:42 +08:00
Luck-Chang
1ac8e739c9 fix some typos and clang-tidy warnings 2022-09-05 09:50:24 +08:00
Alexey Milovidov
d20d49f39f
Merge pull request #40958 from arenadata/ADQM-566
stylecheck renewed and version in docker set explicitely
2022-09-05 03:23:38 +03:00
kssenii
48dc32faf8 Better test 2022-09-04 19:54:34 +02:00
Alexey Milovidov
dbca269ec7
Merge pull request #40321 from azat/mem/untracked_memory_limit_increase
Remove ThreadStatus::untracked_memory_limit_increase
2022-09-04 04:42:24 +03:00
Alexey Milovidov
660c1439ec Fix build 2022-09-04 03:27:55 +02:00
Alexey Milovidov
13a129bee7 Merge branch 'master' into remove-useless-line 2022-09-04 03:24:40 +02:00
Alexey Milovidov
22f7bfdcb5
Update gtest_sensitive_data_masker.cpp 2022-09-04 03:42:58 +03:00
Alexey Milovidov
c6f7ddc5e6
Merge branch 'master' into sensitive_data_masker_unittest_issue 2022-09-04 03:42:24 +03:00
Azat Khuzhin
9479e2143f Do not try to load empty debug files
This will avoid CANNOT_PARSE_ELF error for builds that has empty debug
file in clickhouse-common-static-dbg package, i.e. debug build.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-02 23:23:05 +02:00
Azat Khuzhin
597197c01d Improve error messages in Elf loader
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-02 23:22:25 +02:00
Azat Khuzhin
45afaa6fb8 Fix loading external symbols
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-02 23:22:25 +02:00
Alexander Tokmakov
2044470895 review fixes 2022-09-02 19:18:44 +02:00
Suzy Wang
83b029e716 re arrange sensitive data masker unit test scenario order 2022-09-02 10:11:57 -07:00
Sergei Trifonov
067e712fdf
Merge branch 'master' into s3-detailed-metrics 2022-09-02 16:59:52 +02:00
Ilya Golshtein
74561b40ae stylecheck renewed 2022-09-02 17:42:18 +03:00
Antonio Andelic
b816d46520
Merge branch 'master' into fix-keeper-system-path-check 2022-09-02 13:42:16 +02:00
Antonio Andelic
9ca20b97c2
Merge branch 'master' into keeper-storage 2022-09-02 12:13:07 +02:00
Alexander Tokmakov
3582a51a72
Merge pull request #40920 from ClickHouse/fix-typos
Fix typos found by new `codespell`
2022-09-02 13:11:16 +03:00
Alexander Tokmakov
5b6a8677ef
Merge pull request #40890 from arthurpassos/patch-1
CaresPTRResolver small safety improvement
2022-09-02 12:29:23 +03:00
Antonio Andelic
e64436fef3 Fix typos with new codespell 2022-09-02 08:54:48 +00:00
Antonio Andelic
b7eebfc626 Correctly check if the node is using system path 2022-09-02 07:47:12 +00:00
Robert Schulze
319d8b00a7
Merge pull request #39010 from FrankChen021/tracing_context_propagation
Improve the opentelemetry tracing context propagation across threads
2022-09-02 07:56:43 +02:00
Sergei Trifonov
29e922f05c support all profile events for disk s3 2022-09-02 02:22:52 +02:00
Sergei Trifonov
ac9dc53c73 Merge branch 'master' into s3-detailed-metrics 2022-09-01 18:31:02 +02:00
Sergei Trifonov
bcb6475c4a add separate s3 profile events for disk s3 2022-09-01 18:30:55 +02:00
Dmitry Novik
2ca619d40f
Merge pull request #40320 from azat/memory-tracker-fix-peak-race
Fix rare race in updating peak of memory tracker
2022-09-01 18:07:33 +02:00
Frank Chen
9d63cbe811 Merge 'origin/master' into tracing_context_propagation to resolve conflicts 2022-09-01 23:18:59 +08:00
Alexander Tokmakov
04d431793b
Update src/Common/ZooKeeper/ZooKeeperImpl.cpp
Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
2022-09-01 17:12:22 +03:00
Alexander Tokmakov
36454a340d
Update src/Common/ZooKeeper/ZooKeeperArgs.cpp
Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
2022-09-01 17:12:16 +03:00
Antonio Andelic
62ff61404f Improve remove recursive 2022-09-01 12:16:13 +00:00
Arthur Passos
fb42afbbac
CaresPTRResolver small safety improvement
Previous to #40769, only `hostent::h_aliases` was being accessed. After that PR got merged, `hostent::h_name` started being accessed as well. This PR moves the first `hostent::h_aliases != nullptr` check that could prevent `hostent::h_name` from being accessed. During debugging, I observed that even when there are not aliases, `hostent::h_aliases` is not null. That's why it hasn't caused any problems, but proposing this change to be on the safe side.
2022-09-01 08:59:14 -03:00
kssenii
82879543d3 Merge remote-tracking branch 'upstream/master' into improve-marks-cache-loading 2022-09-01 13:13:01 +02:00
Antonio Andelic
c7d1dd942c Address PR comments 2022-09-01 07:56:06 +00:00
Frank Chen
d9a516288c Resolve comments 2022-09-01 11:56:10 +08:00
kssenii
10a7e73d52 Fix unit test 2022-08-31 21:07:39 +02:00
kssenii
0f747e7987 Move cache files 2022-08-31 17:50:55 +02:00
Robert Schulze
ca01286028
Merge pull request #39629 from ClickHouse/catboost-bridge
Move CatBoost evaluation into clickhouse-library-bridge
2022-08-31 16:16:11 +02:00
Antonio Andelic
9dd1a9859d Merge branch 'master' into keeper-storage 2022-08-31 10:12:11 +00:00
Kseniia Sumarokova
9abcfce529
Merge pull request #40759 from kssenii/fix-write-through-cache-logical-error
Fix logical error from write-though cache from stress test
2022-08-31 11:55:18 +02:00
kssenii
a5f69517ae Allow to load marks in threadpool 2022-08-30 20:20:05 +02:00
Alexander Tokmakov
6a50c20734
Merge branch 'master' into zookeeper_client_fault_injection 2022-08-30 15:43:30 +03:00
Alexander Tokmakov
022f440ad0
Merge pull request #40769 from arthurpassos/caresptrresolver-hosts-patch
Fix CaresPTRResolver not reading hosts file
2022-08-30 14:35:10 +03:00
Kseniia Sumarokova
54f6f5bb2c
Merge branch 'master' into fix-write-through-cache-logical-error 2022-08-30 13:30:13 +02:00
Kseniia Sumarokova
5eb188311a
Merge pull request #40586 from kssenii/fix-race
Fix possible race in fs cache
2022-08-30 12:58:31 +02:00
Alexander Tokmakov
0ec7f068cc
Merge pull request #40677 from ClickHouse/query-insert-oom
Avoid deadlock in case of new query and OOM
2022-08-30 13:54:34 +03:00
Antonio Andelic
53da469147 Merge branch 'master' into keeper-storage 2022-08-30 10:22:04 +00:00
Antonio Andelic
80365e0448 Simplify drop and create 2022-08-30 09:19:59 +00:00
Frank Chen
922a0dee74 Fix style
Signed-off-by: Frank Chen <frank.chen021@outlook.com>
2022-08-30 15:14:12 +08:00
Frank Chen
f17d56b528 Merge branch 'master' into tracing_context_propagation 2022-08-30 14:24:36 +08:00
Frank Chen
83cbdef3c6 Fix context re-initialization for ThreadPool 2022-08-30 12:26:23 +08:00
Robert Schulze
6b2b3c1eb3
feat: implement catboost in library-bridge
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
2022-08-29 20:26:45 +00:00
Dmitry Novik
865ee5d0d6 Refactor code 2022-08-29 20:24:35 +02:00
Arthur Passos
961365c7a4 Fix CaresPTRResolver not reading hosts file 2022-08-29 15:11:39 -03:00
Kseniia Sumarokova
c5c48e44ea
Merge branch 'master' into fix-mysql-timeouts 2022-08-29 19:33:29 +02:00
kssenii
545c6c8be4 Fix 2022-08-29 17:50:27 +02:00
kssenii
b1dab84d97 Review fixes 2022-08-29 16:23:14 +02:00
kssenii
0a6c4b9265 Fix 2022-08-29 16:20:53 +02:00
kssenii
877ade9a50 Merge remote-tracking branch 'upstream/master' into fix-race 2022-08-29 16:05:27 +02:00
Alexander Tokmakov
8bdb589c2b Merge branch 'master' into zookeeper_client_fault_injection 2022-08-29 13:34:57 +02:00
Alexander Tokmakov
69387acffa
Revert "Support for DWARF-5 in in house DWARF parser" 2022-08-29 14:25:53 +03:00
Alexey Milovidov
ae97e880d7
Merge pull request #40710 from azat/DWARF-5
Support for DWARF-5 in in house DWARF parser
2022-08-29 00:13:33 +03:00
Alexey Milovidov
f462160bd1 Merge remote-tracking branch 'origin/master' into remove-useless-line 2022-08-28 21:00:29 +02:00
Alexey Milovidov
00074a5e14
Merge pull request #40711 from ClickHouse/all_new_functions_must_be_documented
All new functions must be documented
2022-08-28 17:05:05 +03:00
Azat Khuzhin
e03870bc8b Common/Dwarf: fix clang-tidy 2022-08-28 15:51:46 +02:00
Alexey Milovidov
d3a7945b1b
Merge pull request #40646 from ClickHouse/force-documentation-3
Every profile event must have documentation
2022-08-28 04:10:11 +03:00
Alexey Milovidov
b42d26acfe Remove one line from XML, because we do not care 2022-08-28 02:44:02 +02:00
Azat Khuzhin
ee5696bb32 Add support for DWARF-5
I have to do this, since I have libraries compiled with DWARF5 (i.e.
glibc).

ClickHouse changes:
- use camel_case
- add NOLINT
- avoid using folly:: (use std:: instead)
- avoid using boost:: (use std:: instead)

Refs: 490b287ca3
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-27 22:28:15 +02:00
Alexey Milovidov
6139cc8f7a Add Documentation to FunctionFactory 2022-08-27 22:06:57 +02:00
Alexey Milovidov
e7054debc1
Merge pull request #40649 from ClickHouse/embedded-documentation
A prototype for embedded documentation
2022-08-27 21:28:11 +03:00