Anton Popov
e27acc26be
better dropPart and dropPartition
2021-05-17 17:26:36 +03:00
Anton Popov
e043cc45bf
Merge remote-tracking branch 'upstream/master' into HEAD
2021-05-17 16:11:12 +03:00
alesapin
eae2df6478
Merge pull request #23997 from ClickHouse/fix_intersecting_parts
...
Try fix intersecting parts
2021-05-17 10:46:58 +03:00
Alexander Tokmakov
970ad94851
Merge branch 'master' into fix_intersecting_parts
2021-05-14 13:17:02 +03:00
kssenii
f33a517d33
Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs
2021-05-14 02:58:26 +03:00
tavplubix
780b7cc8e1
Merge pull request #23863 from Algunenano/mutation_logs
...
Reduce the amount of logs that StorageMergeTree::selectPartsToMutate outputs in busy systems.
2021-05-13 19:02:23 +03:00
Alexander Tokmakov
2da12f0b59
fix intersection of drop range and merge
2021-05-13 17:04:36 +03:00
kssenii
0527f0ea33
Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs
2021-05-12 16:54:18 +03:00
kssenii
393b026f2e
Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs
2021-05-11 16:49:23 +03:00
Amos Bird
264cff6415
Projections
...
TODO (suggested by Nikolai)
1. Build query plan fro current query (inside storage::read) up to WithMergableState
2. Check, that plan is simple enough: Aggregating - Expression - Filter - ReadFromStorage (or simplier)
3. Check, that filter is the same as filter in projection, and also expression calculates the same aggregation keys as in projection
4. Return WithMergableState if projection applies
3 will be easier to do with ActionsDAG, cause it sees all functions, and dependencies are direct (but it is possible with ExpressionActions also)
Also need to figure out how prewhere works for projections, and
row_filter_policies.
wip
2021-05-11 18:12:23 +08:00
Maksim Kita
fdaffe869d
Merge pull request #24007 from ClickHouse/fix-bad-code-2
...
Fix bad code
2021-05-11 12:03:53 +03:00
Alexey Milovidov
eb8a4ffe4b
Fix bad code
2021-05-11 02:43:58 +03:00
Alexander Tokmakov
eef899ae63
better code, add test
2021-05-10 21:03:37 +03:00
Alexey Milovidov
125b2ab214
Suppressions for PVS-Studio
2021-05-08 19:10:23 +03:00
Alexey Milovidov
9d9256d499
Suppressions for PVS-Studio
2021-05-08 17:01:25 +03:00
kssenii
9ec92ec514
Fix tests, less manual concatination of paths
2021-05-05 18:39:30 +03:00
Alexey Milovidov
02ce9cc725
Untangle UUID
2021-05-04 01:46:51 +03:00
Raúl Marín
69a7bc001b
Fix typo
2021-05-03 12:50:44 +02:00
Raúl Marín
867ddab00a
StorageMergeTree::selectPartsToMutate: Reduce the amount of logs when busy
...
In a busy system without enough threads to process mutations at the moment,
you would get a log message per data part with pending mutations, which in
some extreme cases could be dozens per call.
2021-05-03 12:49:12 +02:00
Azat Khuzhin
7a8da84eee
Respect lock_acquire_timeout_for_background_operations for OPTIMIZE
2021-04-25 10:12:15 +03:00
Anton Popov
572b825d4d
fix dropPartition in StorageMergeTree
2021-04-22 23:07:00 +03:00
Anton Popov
42a0416a2b
better drop of empty parts
2021-04-20 05:31:08 +03:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr ( #22297 )
...
* Replace all Context references with std::weak_ptr
* Fix shared context captured by value
* Fix build
* Fix Context with named sessions
* Fix copy context
* Fix gcc build
* Merge with master and fix build
* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
alesapin
6456a1507c
Support alter setting
2021-04-06 13:14:44 +03:00
alesapin
156ba8a7fc
Disable setting by default and ban for old-syntax MergeTree
2021-04-05 12:16:38 +03:00
alesapin
759dd79c76
Add tests
2021-04-02 19:45:18 +03:00
alesapin
2ab87d61eb
Some build fixes
2021-04-02 15:37:42 +03:00
alesapin
14634689e5
Idea code
2021-04-02 14:46:42 +03:00
Alexey Milovidov
230b2930b7
Merge branch 'master' into virtualutil
2021-03-30 00:43:00 +03:00
Anton Popov
8a56d04714
Merge branch 'merge_tree_part_block_number' of git://github.com/ahrefs/ClickHouse into merge_21760
2021-03-23 16:47:14 +03:00
Nikolai Kochetov
c3c393a7aa
Merge branch 'master' into refactor-actions-dag
2021-03-18 14:33:07 +03:00
ip
1a356af579
StorageMergeTree: allocate temp part blocknumber in dest table
2021-03-15 17:03:34 -04:00
Amos Bird
e6522e1ebe
JBOD data balancer
2021-03-08 11:10:35 +08:00
Nikolai Kochetov
9a39459888
Refactor ActionsDAG
2021-03-04 20:38:12 +03:00
Amos Bird
93b661ad5a
partition id pruning
2021-03-04 19:43:03 +08:00
Nikolai Kochetov
d328bfa41f
Review fixes. Add setting max_optimizations_to_apply.
2021-02-26 19:29:56 +03:00
alesapin
3253638969
Fix backoff for failed background tasks in replicated merge tree
2021-02-11 14:46:18 +03:00
Kruglov Pavel
caef103837
Merge branch 'master' into Add_IStoragePolicy_interface
2021-01-29 14:00:12 +03:00
alesapin
5622e6daa6
Fix rare max_number_of_merges_with_ttl_in_pool limit overrun for non-replicated MergeTree
2021-01-27 14:56:12 +03:00
kreuzerkrieg
29a2ef3089
Add IStoragePolicy interface
2021-01-26 10:55:28 +02:00
Alexey Milovidov
8276a1c8d2
Faster parts removal, more safe and efficient interface of IDisk
2021-01-14 19:24:13 +03:00
alexey-milovidov
a08db94343
Revert "Add metrics for part number in MergeTree in ClickHouse"
2021-01-07 16:40:52 +03:00
alexey-milovidov
703e16db5a
Update StorageMergeTree.cpp
2021-01-07 06:38:05 +03:00
weeds085490
5f5b86b485
Merge remote-tracking branch 'origin' into dev/add_metrics_for_parts
2021-01-06 17:32:45 +08:00
alesapin
23156fe6e4
Fix accident stop merges for merge tree
2020-12-22 16:46:09 +03:00
roverxu
b339b9dfd0
fix consistence
2020-12-22 17:38:15 +08:00
Alexey Milovidov
9be5fa9ef2
Merge branch 'master' into Enmk-Optimize_deduplicate
2020-12-20 09:57:10 +03:00
Vasily Nemkov
59fc301344
Fixed test to be less flaky
...
Also logging expanded list of columns passed from `DEDUPLICATE BY` to actual deduplication routines.
2020-12-08 19:44:34 +03:00
Kruglov Pavel
e19eb6f17a
Merge branch 'master' into optimize-data-on-insert
2020-12-08 15:57:46 +03:00
Vasily Nemkov
70ea507dae
OPTIMIZE DEDUPLICATE BY columns
...
Extended OPTIMIZE ... DEDUPLICATE syntax to allow explicit (or implicit with asterisk/column transformers) list of columns to check for duplicates on.
Following syntax variants are now supported:
OPTIMIZE TABLE table DEDUPLICATE; -- the old one
OPTIMIZE TABLE table DEDUPLICATE BY *;
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT colX;
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT (colX, colY);
OPTIMIZE TABLE table DEDUPLICATE BY col1,col2,col3;
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex');
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT colX;
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT (colX, colY);
Note that * behaves just like in SELECT: MATERIALIZED, and ALIAS columns are not used for expansion.
Also, it is an error to specify empty list of columns, or write an expression that results in an empty list of columns, or deduplicate by an ALIAS column.
Column transformers other than EXCEPT are not supported.
2020-12-07 09:44:07 +03:00
Pavel Kruglov
5ae6c6dab9
Fix build error
2020-12-04 20:40:28 +03:00
Pavel Kruglov
905ba78adc
Merge branch 'master' of github.com:ClickHouse/ClickHouse into optimize-data-on-insert
2020-12-04 18:56:46 +03:00
Pavel Kruglov
9dbced0474
Pass setting instead of context
2020-12-04 17:01:59 +03:00
Anton Popov
cd1917c7a6
Merge branch 'master' into optimize_final_optimization
2020-12-03 16:52:51 +03:00
alexey-milovidov
f4a61ac3c3
Merge pull request #17527 from ucasFL/spelling
...
fix spelling errors
2020-11-29 13:45:42 +03:00
feng lv
7e3524caa1
fix spelling errors
2020-11-28 08:17:20 +00:00
nikitamikhaylov
72c7cd6693
replace Context& to Settings&
2020-11-25 16:47:32 +03:00
nikitamikhaylov
68bef22fda
Merge branch 'master' of github.com:ClickHouse/ClickHouse into merging-sequential-consistency
2020-11-23 16:28:35 +03:00
Pavel Kruglov
ca3fe49a2a
Make setting global
2020-11-20 17:29:13 +03:00
Nicolae Vartolomei
94293ca3ce
Assign UUIDs to parts only when configured to do so
...
Avoid breaking backwards compatibility by default for now.
2020-11-20 13:49:17 +00:00
Pavel Kruglov
4c30857759
Minor change
2020-11-20 01:22:40 +03:00
Nicolae Vartolomei
746f8e45f5
All new parts must have uuids
2020-11-19 13:18:03 +00:00
Pavel Kruglov
547ec19fb3
Merge branch 'master' of github.com:ClickHouse/ClickHouse into optimize-data-on-insert
2020-11-18 12:01:59 +03:00
Pavel Kruglov
8d5e0784d3
Add setting optimize_on_insert
2020-11-12 23:37:23 +03:00
Anton Popov
4cecd89e84
fix dropping of empty parts
2020-11-12 20:37:54 +03:00
Anton Popov
0aa35d53c7
Merge remote-tracking branch 'upstream/master' into HEAD
2020-11-12 14:31:58 +03:00
alesapin
2cac5e5d97
Merge pull request #16875 from CurtizJ/refactor-alter-partition
...
Avoid code duplication in alterPartition
2020-11-12 13:19:59 +03:00
tavplubix
058aa8f85e
Merge pull request #16824 from ClickHouse/replace_stringstreams_with_buffers
...
Replace std::*stringstreams with DB::*Buffers
2020-11-12 01:11:44 +03:00
Anton Popov
2497598a49
Remove empty parts after they were pruned by TTL
2020-11-11 19:19:43 +03:00
Anton Popov
6f0dc08ba7
avoid code duplication in alterPartition
2020-11-11 16:34:07 +03:00
Pavel Kruglov
287d71b363
Fix build
2020-11-11 13:34:32 +03:00
Pavel Kruglov
dd06ff4f94
Minor change
2020-11-11 00:02:11 +03:00
Pavel Kruglov
1c35b47073
Add checking select decision in merge
2020-11-10 23:52:26 +03:00
Pavel Kruglov
c648f62629
Merge branch 'master' of github.com:ClickHouse/ClickHouse into optimize_final_optimization
2020-11-10 22:58:21 +03:00
Alexander Tokmakov
b94cc5c4e5
remove more stringstreams
2020-11-10 21:22:26 +03:00
Pavel Kruglov
9120189d8a
Add SelectPartsDecision enum class
2020-11-10 17:42:56 +03:00
Nikolai Kochetov
195c941c4e
Merge branch 'master' into storage-read-query-plan
2020-11-10 15:02:22 +03:00
Nikolai Kochetov
046830967c
Try fix tests.
2020-11-10 13:26:26 +03:00
Alexander Tokmakov
62ff00ee8b
use WriteBuffer in formatAST(...)
2020-11-09 19:05:40 +03:00
alesapin
72046313d4
Merge branch 'master' into nvartolomei-drop-part
2020-11-09 10:02:02 +03:00
alexey-milovidov
0e6ae4aff7
Merge pull request #16253 from amosbird/pf
...
Prune partition in verbatim way.
2020-11-08 18:58:02 +03:00
alexey-milovidov
f4ba5f1f9a
Merge pull request #16772 from ClickHouse/fix-stringstream
...
Fix "server failed to start" error
2020-11-08 14:27:08 +03:00
Alexey Milovidov
5314185e25
Merge branch 'master' into azat-optimize_skip_unused_shards-optimization
2020-11-08 00:17:59 +03:00
Alexey Milovidov
fd84d16387
Fix "server failed to start" error
2020-11-07 03:14:53 +03:00
Nikolai Kochetov
c10f733587
Merge branch 'master' into storage-read-query-plan
2020-11-06 15:43:46 +03:00
Amos Bird
2b0085c106
Pruning is different from counting
2020-11-06 19:58:03 +08:00
Amos Bird
30bf5e6d26
Prune partition in verbatim way.
2020-11-06 09:56:13 +08:00
alesapin
da8ac948bf
Disallow to drop parts with parallel quorum
2020-11-03 12:24:10 +03:00
alesapin
dac6705995
DROP PART and clear blocks in a single zookeeper op
2020-11-02 20:30:59 +03:00
alesapin
67d22b3e57
Merge branch 'master' into nvartolomei-drop-part
2020-11-02 19:09:09 +03:00
hchen9
feaab260d8
Fix conflict
2020-10-23 12:54:33 -07:00
alesapin
39e47c5338
Less strange lambdas
2020-10-23 11:54:00 +03:00
alesapin
7a63b373f9
Merge branch 'blind_fix_of_read_in_order' into no_background_pool_no_more
2020-10-22 15:47:11 +03:00
Nikolai Kochetov
7fa045cff8
Merge branch 'master' into storage-read-query-plan
2020-10-22 13:31:10 +03:00
alexey-milovidov
adeba6bdd8
Merge pull request #15074 from amosbird/btc
...
Extend trivial count optimization.
2020-10-22 02:50:57 +03:00
alesapin
c77b154398
Better locks in merge tree
2020-10-21 00:10:55 +03:00
alesapin
ce8ee01d75
Fix background moves start
2020-10-20 14:27:50 +03:00
alesapin
d126aa8a09
Merge branch 'master' into no_background_pool_no_more
2020-10-20 12:54:42 +03:00
alesapin
514a95c292
Fixup
2020-10-19 12:06:51 +03:00
Alexander Tokmakov
026896835c
fixes
2020-10-16 15:20:30 +03:00