Commit Graph

91667 Commits

Author SHA1 Message Date
Saulius Valatka
0dc7854af1 add initial io_uring support 2022-06-21 09:59:46 +03:00
Saulius Valatka
3f755a2505 add liburing to build 2022-06-21 09:59:46 +03:00
Alexander Tokmakov
75b8800b5c
Merge pull request #37822 from ClickHouse/fix_flaky_tests_with_transactions
Try fix flaky tests with transactions
2022-06-21 09:38:25 +03:00
Larry Luo
bbd73ba727 use utility methods to access x509 struct fields. 2022-06-20 21:27:33 -04:00
Alexey Milovidov
67ab194cd1
Merge pull request #38237 from ClickHouse/auto/v22.3.7.28-lts
Update version_date.tsv after v22.3.7.28-lts
2022-06-21 01:11:36 +03:00
Alexey Milovidov
7e9a3796e9 Fix wrong docs 2022-06-21 00:09:55 +02:00
Anton Popov
dcc9cd0367
fix style check 2022-06-20 22:50:39 +02:00
Maksim Kita
cb018348cf
Merge pull request #38022 from kitaisreal/sorting-added-batch-queue-variants
Sorting added batch queue variants
2022-06-20 22:35:44 +02:00
zvonand
16cd39e4e4 Merge branch 'master' of github.com:ClickHouse/ClickHouse 2022-06-21 00:06:17 +05:00
zvonand
22af00b757 rename variable + fix handling of ENABLE_LIBRARIES 2022-06-20 23:53:47 +05:00
zvonand
ad2b9cc4e4 upd tests 2022-06-20 23:38:45 +05:00
Nikolai Kochetov
dccf90b1ea Cleanup. 2022-06-20 18:18:17 +00:00
mergify[bot]
9bdd9e14a6
Merge branch 'master' into fix_flaky_tests_with_transactions 2022-06-20 18:11:30 +00:00
Dmitry Novik
f6692c34e6
Merge pull request #34632 from excitoon-favorites/optimizedprocessing
Optimized processing of ORDER BY in window functions
2022-06-20 20:03:26 +02:00
Kseniia Sumarokova
2d039b739c
Update ReadBufferFromFileDescriptor.cpp 2022-06-20 19:13:20 +02:00
Kseniia Sumarokova
e48ce50863
Update ArrowBufferedStreams.cpp 2022-06-20 19:12:51 +02:00
alesapin
83ad0c8cc5
Merge pull request #38091 from ClickHouse/jepsen-add-perf-checkers
Add perf checkers to all Jepsen tests
2022-06-20 19:05:08 +02:00
Anton Popov
464cb59920 slightly better code 2022-06-20 16:22:36 +00:00
Anton Popov
5b439d4117 add test 2022-06-20 16:08:43 +00:00
Alexander Tokmakov
0fa1fc66c4
Update 02232_dist_insert_send_logs_level_hung.sh 2022-06-20 18:55:17 +03:00
Anton Popov
59a9ce6def fix reading from s3 in some corner cases 2022-06-20 15:24:38 +00:00
kssenii
cea81822bd Fix 2022-06-20 17:19:36 +02:00
mergify[bot]
b440ee84ae
Merge branch 'master' into fix-short-circuit 2022-06-20 15:14:19 +00:00
zvonand
d4e5686b99 minor: fix message for base64 2022-06-20 20:13:09 +05:00
zvonand
9c6b2b9ba0 added docs 2022-06-20 20:10:28 +05:00
robot-clickhouse
4996236430 Update version_date.tsv after v22.3.7.28-lts 2022-06-20 14:41:14 +00:00
Robert Schulze
55b39e709d
Merge remote-tracking branch 'origin/master' into clang-tsa 2022-06-20 16:39:32 +02:00
Dale McDiarmid
6c2c408d9d Fix test for system table count in diag tool 2022-06-20 15:37:15 +01:00
zvonand
78d55d6f46 small fixes 2022-06-20 19:30:54 +05: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
Antonio Andelic
df31b562ec Use sync after reconnect to avoid stale reads 2022-06-20 14:05:51 +00:00
mergify[bot]
f3264e50ec
Merge branch 'master' into play-charts 2022-06-20 14:01:47 +00:00
Alexander Tokmakov
b5a977ad54
Merge pull request #38213 from azat/stress-thread-fuzzer-v2
tests/stress: fix TSan detection
2022-06-20 16:46:31 +03:00
Nikolai Kochetov
39b02d4ab8 Continure resolving conflicts. 2022-06-20 15:39:05 +02:00
Nikolai Kochetov
7452d04e3a Merge branch 'master' into refactor-something-in-part-volumes 2022-06-20 15:31:02 +02:00
kssenii
5dd1bb2fd8 improvements for getFileSize 2022-06-20 15:22:56 +02:00
Nikolai Kochetov
ef8b967c3f Fix more tests. 2022-06-20 13:07:14 +00: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
Dmitry Novik
77177917bd
Merge pull request #37848 from ClickHouse/window-function-expression
Support expressions with window functions
2022-06-20 14:21:13 +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
alesapin
7ae775d2db Review fixes 2022-06-20 14:01:05 +02:00
alesapin
e3184d264b Merge branch 'master' into disk_transaction 2022-06-20 13:47:30 +02:00
mergify[bot]
2d25daf64d
Merge branch 'master' into clickhouse-disks-fixes 2022-06-20 11:20:59 +00:00
Ilya Yatsishin
24d5be1669
Merge pull request #38212 from azat/no-stress
tests: disable 01646_system_restart_replicas_smoke under stress tests
2022-06-20 12:54:32 +02:00
Rafael Acevedo
51035ee300
Update librdkafka
Update to get fixes from https://github.com/ClickHouse/librdkafka/pull/5

Refs https://github.com/ClickHouse/ClickHouse/issues/38151
2022-06-20 07:19:58 -03: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
Sergei Trifonov
c0a275984f
Merge pull request #38169 from ClickHouse/trace-visualizer
improve trace-visualizer UX
2022-06-20 12:05:38 +02:00