Vitaly Baranov
92e0ee0b6f
More detailed error messages.
2022-07-03 14:20:19 +02:00
alesapin
b2db49dbf1
Merge branch 'master' into better_data_part_storage_builder
2022-07-02 15:39:44 +02:00
alesapin
0d7298f3a9
Fix typos
2022-07-01 15:26:27 +02:00
alesapin
57284e6a9d
Fix possible deadlocks with MergeTreeData::Transaction
2022-07-01 15:16:32 +02:00
Vitaly Baranov
cadb496894
Merge pull request #38537 from vitlibar/backup-improvements-8
...
Backup Improvements 8
2022-07-01 11:20:46 +02:00
Amos Bird
d73f975849
Fix intermediate header in aggregate projection
2022-07-01 16:47:32 +08:00
alesapin
09faa1641e
Some comments
2022-06-30 23:09:32 +02:00
alesapin
979565edf0
Merge branch 'master' into better_data_part_storage_builder
2022-06-30 22:54:42 +02:00
alesapin
eb5046ab26
Simplify everything
2022-06-30 22:51:27 +02:00
Alexander Tokmakov
d2cbdc7c53
Update ReplicatedMergeTreeQueue.cpp
2022-06-30 17:23:53 +03:00
Vitaly Baranov
e367d96964
Fix style.
2022-06-30 15:10:33 +02:00
alesapin
1363b478d4
Merge branch 'fix_disk_tx_write_op' into better_data_part_storage_builder
2022-06-30 14:38:32 +02:00
Anton Popov
7c721578c7
Merge pull request #38320 from CurtizJ/dynamic-columns-16
...
Improve performace of insertion to columns of type JSON
2022-06-30 14:18:20 +02:00
alesapin
cb90aca2ef
Some changes in merge tree
2022-06-30 14:12:45 +02:00
Vitaly Baranov
031ca28fdc
Add test for partition clause. More checks for data compatibility on restore.
2022-06-30 08:37:18 +02:00
Vitaly Baranov
01921ce9a3
Move most code from setTableStructure() to a separate function.
2022-06-30 08:37:17 +02:00
Vitaly Baranov
7689e0c36f
Improve gathering metadata for backup - part 6.
2022-06-30 08:37:17 +02:00
Vitaly Baranov
47ac47350b
Store projections in backups.
2022-06-30 08:37:17 +02:00
alesapin
67f2fa0ef0
Fix style
2022-06-29 15:18:48 +02:00
alesapin
2f03e821bd
Fix stupid bug
2022-06-29 15:08:16 +02:00
alesapin
ac963a7663
Remove redundant check
2022-06-29 13:55:20 +02:00
Alexander Tokmakov
8246e55002
Merge pull request #38486 from azat/fix-parts-removal
...
Fix parts removal after incorrect server shutdown
2022-06-29 14:17:59 +03:00
Alexander Tokmakov
ceb66ade4b
Merge pull request #38335 from ClickHouse/deprecate_ordinary_database
...
Deprecate Ordinary database and old *MergeTree syntax
2022-06-29 13:42:59 +03:00
alesapin
c80a4c27be
Merge branch 'master' into better_data_part_storage_builder
2022-06-29 12:33:42 +02:00
Alexey Milovidov
4cda5491f6
Merge pull request #38542 from ClickHouse/unique_lock-to-lock_guard
...
Don't use std::unique_lock unless we need to
2022-06-29 09:40:56 +03:00
Nikita Taranov
f5d26572df
Quick fix for aggregation pipeline ( #38295 )
2022-06-29 01:16:30 +02: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
alesapin
6429b72371
Fixes
2022-06-28 14:41:22 +02:00
alesapin
c7620b8217
Use builder instead of disk
2022-06-28 13:19:30 +02:00
alesapin
a68bf8fff2
Missed changes
2022-06-28 12:59:54 +02:00
alesapin
0a3fab1cb6
Some sad changes
2022-06-28 12:51:49 +02:00
alesapin
49add19842
Merge branch 'better_data_part_storage_builder' of github.com:ClickHouse/ClickHouse into better_data_part_storage_builder
2022-06-28 12:02:27 +02:00
alesapin
1a4aa8e52e
Merge branch 'master' into better_data_part_storage_builder
2022-06-28 11:51:06 +02:00
Azat Khuzhin
e70cff2cea
Fix parts removal after incorrect server shutdown
...
Before this patch, and after transaction support had been added #24258 ,
if the server had not removed old parts on shutdown, then they will left
forever.
Fixes : #24258 (cc @tavplubix)
v2: use Tx::PrehistoricTID over removePartsFromWorkingSet() from ctor
v3: apply black to new test
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-27 23:56:25 +03:00
Azat Khuzhin
f0271dc486
Refactor deactive_part() a little
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-27 23:42:39 +03:00
alesapin
d88cdcd5c1
AAA
2022-06-27 21:41:29 +02:00
alesapin
180b4cd64d
Merge branch 'master' into better_data_part_storage_builder
2022-06-27 19:46:17 +02:00
Alexander Tokmakov
88dbbcb15d
fix tests
2022-06-27 16:10:00 +02:00
Alexander Tokmakov
7c37079a96
Merge branch 'master' into deprecate_ordinary_database
2022-06-27 14:46:59 +02:00
Nikita Taranov
2487ba7f00
Move updateInputStream
to ITransformingStep
( #37393 )
2022-06-27 13:16:52 +02:00
alesapin
83b584b2dd
Something
2022-06-26 18:43:28 +02:00
alesapin
e2a779b315
Merge with new changes
2022-06-25 00:29:45 +02:00
alesapin
80d27f6381
Merge pull request #38380 from ClickHouse/simplify_parts_commit_merge_tree
...
Simplify parts commit methods
2022-06-25 00:12:52 +02:00
alesapin
8ccc47c202
Revert some changes
2022-06-24 23:54:10 +02:00
Alexander Tokmakov
31dcc7634e
Merge branch 'master' into deprecate_ordinary_database
2022-06-24 18:16:07 +02:00
alesapin
d963f262f8
Fix style
2022-06-24 17:43:18 +02:00
alesapin
f685cf2268
Fix comment
2022-06-24 17:33:43 +02:00
alesapin
011d58d7a0
Simplify more
2022-06-24 17:19:59 +02:00
alesapin
612c4571d5
Split method into smaller
2022-06-24 15:41:09 +02:00
alesapin
7517e1f4d5
Remove some complexity
2022-06-24 15:24:02 +02:00
alesapin
c57e07cb49
Style
2022-06-24 14:51:47 +02:00
alesapin
37310dc9df
Simpler
2022-06-24 14:10:15 +02:00
alesapin
36b810b076
Remove unused parameter
2022-06-24 13:42:36 +02:00
alesapin
af1a9d18ab
Remove transaction argument
2022-06-24 13:34:00 +02:00
alesapin
9910395823
Simplify method signature
2022-06-24 13:19:29 +02:00
Alexander Tokmakov
dbf2763788
automatically convert system database to Atomic
2022-06-23 21:38:43 +02:00
alesapin
2bdedf5e0c
Some changes
2022-06-23 18:21:46 +02:00
mergify[bot]
174d8577fa
Merge branch 'master' into merge_tree_reader
2022-06-23 15:16:51 +00:00
alesapin
5661280ef6
Remove some read methods
2022-06-23 14:01:26 +02:00
Alexander Tokmakov
f00e6b5a7a
deprecate old MergeTree syntax
2022-06-23 11:24:54 +02:00
alesapin
1b495ec8ad
Fix style
2022-06-23 00:17:37 +02:00
Anton Popov
52db1b35a1
improve performace of insertion to columns of type JSON
2022-06-22 17:45:51 +00:00
Alexander Gololobov
0ee47363d4
Fixed includes
2022-06-22 19:08:18 +02:00
Alexander Gololobov
8138a3a36e
Cleanups based on review comments
2022-06-22 19:08:01 +02:00
alesapin
ca0299e927
Ban projections for zero-copy replication in a right way
2022-06-22 19:01:46 +02:00
Alexander Gololobov
e5b55b965b
Removed incorrect check
2022-06-22 17:23:09 +02:00
Alexander Gololobov
dbc6d1a159
Cleanups
2022-06-22 17:23:09 +02:00
Alexander Gololobov
aea5bc7527
Removed unused should_reorder flag
2022-06-22 17:23:09 +02:00
Alexander Gololobov
5427d5c51b
Apply filter at row level security step
2022-06-22 17:23:09 +02:00
Alexander Gololobov
b3922461b3
Properly handle empty actions
2022-06-22 17:23:09 +02:00
Alexander Gololobov
ba89c3954c
Do not add the same vitrual if it has been added by prev_reader
2022-06-22 17:23:09 +02:00
Alexander Gololobov
e5c0ebc7b5
Handle read from wide part when no columns are requested
2022-06-22 17:23:09 +02:00
Alexander Gololobov
a9e3b8d29e
Don't read the same columns again
2022-06-22 17:23:09 +02:00
Alexander Gololobov
4e426c63cc
Debuging test failures
2022-06-22 17:23:09 +02:00
Alexander Gololobov
6a26325fab
Test dirty hacks for multiple PREWHERE steps
2022-06-22 17:23:05 +02:00
Alexander Gololobov
4360fd9798
Vector of structs instead of multiple vectors
2022-06-22 17:17:42 +02:00
Alexander Gololobov
87b669f439
Intermediate changes
2022-06-22 17:17:42 +02:00
Alexander Gololobov
159ab765fb
Moved estimateNumRows from lambda to function
2022-06-22 17:17:42 +02:00
Alexander Gololobov
64a2f3734b
Protect ReadResult internals from MergeTreeRangeReader clients
2022-06-22 17:17:42 +02:00
Nikolai Kochetov
cc6fdfe0eb
Merge pull request #36555 from ClickHouse/refactor-something-in-part-volumes
...
Separate data storage abstraction for MergeTree
2022-06-22 11:13:36 +02: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
Nikolai Kochetov
dcf6e0d060
Roll back some changes from IPartMetadataManager
2022-06-21 13:05:49 +00:00
Nikolai Kochetov
854d148d73
Add some comments. Remove some commented code.
2022-06-21 12:31:02 +00:00
Nikolai Kochetov
46c4fd6cf7
Fixing build.
2022-06-21 11:15:06 +00:00
Kruglov Pavel
3c5a627bd7
Merge pull request #38239 from CurtizJ/fix-reading-from-s3
...
Fix reading from s3 in some corner cases
2022-06-21 12:57:55 +02:00
Nikolai Kochetov
1e8c9ecd4c
Merge branch 'master' into refactor-something-in-part-volumes
2022-06-21 12:37:21 +02:00
alesapin
fafcb876be
Merge pull request #38182 from ClickHouse/disk_transaction
...
Disk transaction
2022-06-21 12:28:49 +02:00
Nikolai Kochetov
b8d27aa8dd
Merge pull request #37469 from azat/projections-optimize_aggregation_in_order
...
Implement in order aggregation (optimize_aggregation_in_order) for projections for tables with fully materialized projections
2022-06-21 12:17:35 +02:00
Nikolai Kochetov
e45d552f4d
Do not create empty folder for in-memory parts.
2022-06-21 09:59:46 +00:00
Nikolai Kochetov
5232c17b89
Fix style
2022-06-21 07:30:45 +00:00
Nikolai Kochetov
3429a5e07a
Fix
2022-06-21 07:26:43 +00: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
Anton Popov
59a9ce6def
fix reading from s3 in some corner cases
2022-06-20 15:24:38 +00:00
Robert Schulze
55b39e709d
Merge remote-tracking branch 'origin/master' into clang-tsa
2022-06-20 16:39:32 +02: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
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
Nikolai Kochetov
ef8b967c3f
Fix more tests.
2022-06-20 13:07:14 +00:00
Vitaly Baranov
06c4082a7c
Merge pull request #37358 from vitlibar/backup-improvements-6
...
Backup Improvements 6
2022-06-20 14:13:30 +02:00