Antonio Andelic
1d26446f84
Define new list request type
2022-06-29 08:30:39 +00:00
Robert Schulze
bb441faa42
Merge pull request #38491 from ClickHouse/clang-tidy-in-branches
...
Fix some clang-tidy warnings in headers
2022-06-29 10:22:04 +02:00
Alexey Milovidov
dea3b5bfce
Revert "Non Negative Derivative window function"
2022-06-29 08:56:15 +03:00
HeenaBansal2009
608bfb8453
Fixed {..} regex parsing as shell does
2022-06-28 12:49:31 -07:00
Robert Schulze
f692ead6ad
Don't use std::unique_lock unless we have to
...
Replace where possible by std::lock_guard which is more light-weight.
2022-06-28 19:19:06 +00:00
Robert Schulze
c22038d48b
More clang-tidy fixes
2022-06-28 11:50:05 +00:00
HeenaBansal2009
6a5819a405
Fixed bug in parsing{..} regex
2022-06-27 22:51:31 -07:00
Robert Schulze
5e28580f11
Fix some clang-tidy warnings in headers
2022-06-27 23:49:07 +02:00
Dmitry Novik
b629d557ce
Merge pull request #38246 from ClickHouse/overcommit-deadlock-fix
...
Fix deadlock in OvercommitTracker logging
2022-06-27 21:57:31 +02:00
Nikita Taranov
986ead7358
use old HashTableGrower with *WithStackMemory data structures
2022-06-27 20:34:18 +02:00
Robert Schulze
53cd8820d3
Merge pull request #38434 from ClickHouse/multi-match-with-nonconst-patterns
...
Refactoring to enable multi-match functions with non-const needles
2022-06-27 19:35:48 +02:00
Antonio Andelic
c06776ce0d
Merge branch 'master' into zookeeper-add-extra-list-argument
2022-06-27 06:53:29 +00:00
Antonio Andelic
0d906e311d
PR review fixes
2022-06-27 06:53:09 +00:00
Robert Schulze
bb7c627964
Cosmetics: Pass patterns around as std::string_view instead of StringRef
...
- The patterns are not used in hashing, there should not be a performance
impact when we use stuff from the standard library instead.
- added forgotten .reserve() in FunctionsMultiStringPosition.h
2022-06-26 15:32:19 +00:00
mergify[bot]
f63c959679
Merge branch 'master' into cleanup_garbage_in_store_dir
2022-06-26 13:35:10 +00:00
Nikita Taranov
95d413d7ec
put the thing into its own cache line
2022-06-26 01:38:45 +02:00
Alexey Milovidov
25cc406201
Update src/Common/ThreadStatus.cpp
...
Co-authored-by: Dmitry Novik <n0vik@clickhouse.com>
2022-06-26 01:29:06 +03:00
Nikita Taranov
abcefeeb41
cleanup
2022-06-25 23:15:59 +02:00
mergify[bot]
469f24a12c
Merge branch 'master' into zookeeper-add-extra-list-argument
2022-06-25 12:01:06 +00:00
Alexey Milovidov
e33f236d50
Slight improvement
2022-06-25 03:59:01 +02:00
Alexey Milovidov
b89f01438e
Lower mutex scope
2022-06-25 03:05:55 +02:00
Nikita Taranov
6639d94125
stash
2022-06-25 01:32:21 +02:00
Nikita Taranov
c476427422
stash
2022-06-25 01:27:24 +02:00
Nikita Taranov
f6ef78c0f1
stash
2022-06-25 01:26:46 +02:00
mergify[bot]
92eff431be
Merge branch 'master' into overcommit-deadlock-fix
2022-06-24 13:54:11 +00:00
Alexander Tokmakov
cfe0e434e5
Revert "Add support for io_uring read method"
2022-06-24 12:19:41 +03:00
mergify[bot]
a0eb831cd1
Merge branch 'master' into overcommit-deadlock-fix
2022-06-23 23:02:59 +00:00
Alexey Milovidov
812ab9bd6b
Merge pull request #36103 from sauliusvl/uring
...
Add support for io_uring read method
2022-06-24 00:34:29 +03:00
Alexander Tokmakov
74f38710a8
Merge branch 'master' into cleanup_garbage_in_store_dir
2022-06-23 21:43:28 +02:00
kssenii
6fbd49f554
Merge master
2022-06-23 21:40:01 +02:00
kssenii
468c98ff42
Better
2022-06-23 17:46:27 +02:00
Antonio Andelic
ae3d9fd962
Expose list request type in internal client
2022-06-23 10:28:12 +00:00
Antonio Andelic
568c957eb2
Fix TestKeeper
2022-06-23 10:28:12 +00:00
Antonio Andelic
3a71b63b5d
Add list request type
2022-06-23 10:28:12 +00:00
Antonio Andelic
a5ee918bd2
Merge pull request #38047 from ClickHouse/keeper-sequential-consistency-reads
...
Add `SYNC` command to internal ZooKeeper client
2022-06-23 08:43:24 +02:00
Dmitry Novik
3544fbe5c4
cleanup
2022-06-22 14:05:20 +00:00
Robert Schulze
0d80874d40
Merge pull request #38068 from ClickHouse/clang-tsa
...
Support for Clang Thread Safety Analysis (TSA)
2022-06-21 20:19:33 +02:00
kssenii
481644939a
Add describe cache command
2022-06-21 16:07:39 +02:00
Dmitry Novik
099055c183
Explicitly forbid allocations in OvercommitTracker
2022-06-21 12:26:13 +00:00
Alexander Tokmakov
ba0fcec993
add background cleanup of store/ subdirs
2022-06-21 12:35:47 +02:00
Saulius Valatka
160c95a6b8
unpoisson memory read by io_uring, handle interrupted syscalls, do not throw from monitor thread
2022-06-21 13:20:21 +03:00
Saulius Valatka
7b5e13a9eb
implement pending request queue to prevent CQ overflows, more error checking, reduce size of io_uring
2022-06-21 13:17:56 +03:00
Dmitry Novik
e10f079bd3
Get rid of allocations in OvercommitTracker
2022-06-21 10:15:33 +00:00
Kseniia Sumarokova
71ee5dbbb2
Merge pull request #38227 from kssenii/diff-reduce
...
buffer's getFileSize small changes
2022-06-21 12:12:22 +02:00
mergify[bot]
bdd5b94192
Merge branch 'master' into keeper-sequential-consistency-reads
2022-06-21 08:13:04 +00:00
Saulius Valatka
0dc7854af1
add initial io_uring support
2022-06-21 09:59:46 +03:00
lingpeng0314
c18dd55400
Resolve comments
...
- refine metric description
2022-06-21 10:30:19 +08:00
Dmitry Novik
9ca368ac20
Use do while(false) in macro
2022-06-20 23:10:40 +00:00
mergify[bot]
9bdd9e14a6
Merge branch 'master' into fix_flaky_tests_with_transactions
2022-06-20 18:11:30 +00:00
Dmitry Novik
53d656d89f
Fix deadlock in OvercommitTracker logging
2022-06-20 17:35:24 +00:00
Robert Schulze
55b39e709d
Merge remote-tracking branch 'origin/master' into clang-tsa
2022-06-20 16:39:32 +02:00
Antonio Andelic
0c76fc1121
Fix style
2022-06-20 14:21:59 +00:00
Robert Schulze
5a4f21c50f
Support for Clang Thread Safety Analysis (TSA)
...
- TSA is a static analyzer build by Google which finds race conditions
and deadlocks at compile time.
- It works by associating a shared member variable with a
synchronization primitive that protects it. The compiler can then
check at each access if proper locking happened before. A good
introduction are [0] and [1].
- TSA requires some help by the programmer via annotations. Luckily,
LLVM's libcxx already has annotations for std::mutex, std::lock_guard,
std::shared_mutex and std::scoped_lock. This commit enables them
(--> contrib/libcxx-cmake/CMakeLists.txt).
- Further, this commit adds convenience macros for the low-level
annotations for use in ClickHouse (--> base/defines.h). For
demonstration, they are leveraged in a few places.
- As we compile with "-Wall -Wextra -Weverything", the required compiler
flag "-Wthread-safety-analysis" was already enabled. Negative checks
are an experimental feature of TSA and disabled
(--> cmake/warnings.cmake). Compile times did not increase noticeably.
- TSA is used in a few places with simple locking. I tried TSA also
where locking is more complex. The problem was usually that it is
unclear which data is protected by which lock :-(. But there was
definitely some weird code where locking looked broken. So there is
some potential to find bugs.
*** Limitations of TSA besides the ones listed in [1]:
- The programmer needs to know which lock protects which piece of shared
data. This is not always easy for large classes.
- Two synchronization primitives used in ClickHouse are not annotated in
libcxx:
(1) std::unique_lock: A releaseable lock handle often together with
std::condition_variable, e.g. in solve producer-consumer problems.
(2) std::recursive_mutex: A re-entrant mutex variant. Its usage can be
considered a design flaw + typically it is slower than a standard
mutex. In this commit, one std::recursive_mutex was converted to
std::mutex and annotated with TSA.
- For free-standing functions (e.g. helper functions) which are passed
shared data members, it can be tricky to specify the associated lock.
This is because the annotations use the normal C++ rules for symbol
resolution.
[0] https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
[1] https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42958.pdf
2022-06-20 16:13:25 +02:00
Antonio Andelic
777ae72259
Merge branch 'master' into keeper-sequential-consistency-reads
2022-06-20 14:06:45 +00:00
kssenii
5dd1bb2fd8
improvements for getFileSize
2022-06-20 15:22:56 +02:00
Antonio Andelic
6c225bb04d
Update src/Common/ZooKeeper/ZooKeeperImpl.cpp
...
Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
2022-06-20 14:55:59 +02:00
Vitaly Baranov
06c4082a7c
Merge pull request #37358 from vitlibar/backup-improvements-6
...
Backup Improvements 6
2022-06-20 14:13:30 +02:00
mergify[bot]
4ed606a275
Merge branch 'master' into fix_flaky_tests_with_transactions
2022-06-20 10:17:51 +00:00
Kseniia Sumarokova
a756b4be27
Merge pull request #37391 from azat/insert-profile-events-fix
...
Send profile events for INSERT queries (previously only SELECT was supported)
2022-06-20 12:16:29 +02:00
lingpeng0314
f06b19bdbf
Add keeper monitoring data
2022-06-20 11:32:18 +08:00
Vitaly Baranov
a0c558a17e
Implement backup/restore for ACL system tables (system.users, system.roles, etc.)
2022-06-17 18:14:31 +02:00
Alexander Tokmakov
e9c2157f01
Merge branch 'master' into fix_flaky_tests_with_transactions
2022-06-17 15:57:30 +02:00
alesapin
1c7a7da487
Merge pull request #38088 from kssenii/diff-with-cache
...
Extract some diff from pr #36171
2022-06-17 12:07:31 +02:00
Alexander Tokmakov
39c0219c11
fixes
2022-06-16 19:41:32 +02:00
alesapin
ca33ff93cb
Merge pull request #37555 from ClickHouse/revert-37534-revert-37036-keeper-preprocess-operations
...
Add support for preprocessing ZooKeeper operations and real-time digest in `clickhouse-keeper`
2022-06-16 17:29:00 +02:00
kssenii
797482f132
Better
2022-06-16 16:40:29 +02:00
Azat Khuzhin
b3bf7589ef
Fix possible concurrent access in ProgressIndication
...
In case of all of the above:
- clickhouse-local
- input_format_parallel_parsing=true
- write_progress_on_update=true
It is possible concurrent access to the following:
- writeProgress() (class properties) (guarded with progress_mutex)
- thread_data/host_cpu_usage (guarded with profile_events_mutex)
v2: decrease number of rows for INSERT ProfileEvents test (10 times)
CI: https://s3.amazonaws.com/clickhouse-test-reports/37391/4bd5c335182279dcc5020aa081b13c3044135951/stateless_tests__debug__actions__[1/3].html
v3: decrease number of rows for INSERT ProfileEvents test (10 times) and add a comment
CI: https://s3.amazonaws.com/clickhouse-test-reports/37391/026d7f732cb166c90d6c287b02824b6c7fdebf0c/stateless_tests_flaky_check__address__actions_/runlog.log
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
f
2022-06-16 11:59:01 +03:00
Antonio Andelic
0b843d316f
Merge branch 'master' into keeper-sequential-consistency-reads
2022-06-16 07:52:56 +00:00
Alexey Milovidov
c26abbfdc5
Merge pull request #38093 from danlark1/master
...
Optimize most important parts with NEON SIMD
2022-06-16 08:26:56 +03:00
Robert Schulze
b39b963733
Merge pull request #37993 from ClickHouse/stripping
...
Strip less aggressively to make the embedded hash survive
2022-06-16 00:08:36 +02:00
Vitaly Baranov
21f3bed435
Simplify path calculations in backup.
2022-06-15 20:32:34 +02:00
Vitaly Baranov
592f568f83
Move backup/restore code to storages and databases - part 2.
2022-06-15 20:32:31 +02:00
Danila Kutenin
048f56bf4d
Fix some tests and comments
2022-06-15 14:40:21 +00:00
kssenii
500f49972b
Extract diff from PR 36171
2022-06-15 16:40:18 +02:00
Danila Kutenin
08e3f77a9c
Optimize most important parts with NEON SIMD
...
First part, updated most UTF8, hashing, memory and codecs. Except
utf8lower and upper, maybe a little later.
That includes huge amount of research with movemask dealing. Exact
details and blog post TBD.
2022-06-15 13:19:29 +00:00
mergify[bot]
d148299c20
Merge branch 'master' into revert-37534-revert-37036-keeper-preprocess-operations
2022-06-15 07:11:31 +00:00
Alexey Milovidov
0957c885e2
Remove -0. from CPU usage in the client
2022-06-14 23:36:16 +02:00
mergify[bot]
4bd61950db
Merge branch 'master' into stripping
2022-06-14 20:48:52 +00:00
alesapin
af1cd745e1
Merge pull request #37975 from kssenii/clean-up-broken-detached
...
Clean up broken detached parts after timeout
2022-06-14 20:53:31 +02:00
Antonio Andelic
b7bd5a8eb1
Merge branch 'master' into revert-37534-revert-37036-keeper-preprocess-operations
2022-06-14 12:51:35 +00:00
Antonio Andelic
c98c6566bf
Use std::pair
2022-06-14 12:49:42 +00:00
Maksim Kita
da8b1b1eba
Merge pull request #38025 from kitaisreal/use-base-sort-instead-of-standard
...
Use pdqsort instead of standard sort
2022-06-14 12:13:35 +02:00
Antonio Andelic
367df12626
Add sync support to client
2022-06-14 09:50:30 +00:00
Robert Schulze
bc46cef63c
Minor follow-up
...
- change ELF section name to ".clickhouse.hash" (lowercase seems
standard)
- more expressive/concise integrity check messages at startup
2022-06-14 08:52:13 +00:00
kssenii
74cffaf186
Merge master
2022-06-14 00:45:19 +02:00
Antonio Andelic
e5504f1b33
Merge branch 'master' into revert-37534-revert-37036-keeper-preprocess-operations
2022-06-13 15:43:10 +00:00
Maksim Kita
98a89b50ff
Use pdqsort instead of standard sort
2022-06-13 15:31:08 +02:00
Kseniia Sumarokova
7fd1140e96
Merge pull request #38004 from xiedeyantu/optimize_max_cache
...
fix when open enable_filesystem_query_cache_limit, throw LOGICAL_ERROR
2022-06-13 11:54:09 +02:00
Robert Schulze
9ec56fa362
Merge pull request #37628 from zvonand/non-neg-deriv
...
Non Negative Derivative window function
2022-06-13 11:21:16 +02:00
Robert Schulze
bc6f30fd40
Move binary hash to ELF section ".ClickHouse.hash"
2022-06-13 08:46:23 +00:00
xiedeyantu
c93ef2b033
fix when open enable_filesystem_query_cache_limit, throw Reserved cache size exceeds the remaining cache size
2022-06-12 15:03:06 +08:00
kssenii
4859e11c27
Review fixes
2022-06-12 01:15:10 +02:00
Alexander Tokmakov
a1ca690afb
Merge pull request #37976 from ClickHouse/tavplubix-patch-1
...
Try fix `test_consistent_parts_after_clone_replica`
2022-06-10 21:04:56 +03:00
Alexander Tokmakov
2319ef7647
fix test
2022-06-10 17:48:14 +02:00
zvonand
5beb6e0c3b
Merge branch 'master' of github.com:ClickHouse/ClickHouse into non-neg-deriv
2022-06-10 17:40:16 +03:00
Kseniia Sumarokova
580a30c6ae
Merge pull request #37859 from KinderRiven/support_max_request_cache_size
...
Support to set max cache size for per query in local cache
2022-06-10 16:17:18 +02:00
zvonand
794dbe6b60
new stateless queries + minor fixes
2022-06-10 17:01:49 +03:00
Robert Schulze
5f5732a2c4
Merge pull request #37969 from ClickHouse/consistent-macro-usage
...
More consistent use of platform macros
2022-06-10 14:10:01 +02:00
kssenii
498f389c21
Merge master
2022-06-10 12:49:10 +02:00
kssenii
7a2676c7ab
Clean up broken detached parts with timeout
2022-06-10 12:27:57 +02:00