Commit Graph

5955 Commits

Author SHA1 Message Date
vdimir
44c68ffdab
Add config param allow_remove_stale_moving_parts 2023-06-08 10:17:02 +00:00
Robert Schulze
1b26901db4
Merge branch 'master' into annoy_cleanup 2023-06-08 09:59:10 +02:00
Sergei Trifonov
59cee29155
Merge branch 'master' into unify-priorities-executable-tasks 2023-06-08 06:42:39 +02:00
Alexander Tokmakov
46caffd249
Merge branch 'master' into rmt_better_background_tasks_scheduling 2023-06-07 23:30:02 +03:00
Nikita Mikhaylov
e1ceb01ad0
Parallel replicas for short queries (#50639) 2023-06-07 19:45:27 +02:00
serxa
3cdbccd9ea Unify priorities: IExecutableTasks 2023-06-07 16:50:04 +00:00
vdimir
80f918d4b7
Fixes for cleanup moving parts 2023-06-07 13:57:24 +00:00
vdimir
09fecace43
upd 2023-06-07 13:57:23 +00:00
vdimir
db1c03d6db
Cleanup moving parts 2023-06-07 13:57:22 +00:00
Alexander Tokmakov
d2aa1779ed Merge branch 'master' into rmt_better_background_tasks_scheduling 2023-06-07 14:58:50 +02:00
Robert Schulze
7c80046834
Revert "Remove clang-tidy exclude"
This reverts commit 42c0547895.
2023-06-07 09:47:54 +00:00
Robert Schulze
52e265badd
Merge remote-tracking branch 'rschu1ze/master' into annoy_cleanup 2023-06-07 09:13:41 +00:00
Boris Kuschel
1fa1215d15 Avoid UB 2023-06-06 19:08:42 -04:00
Boris Kuschel
689e0cabe0 Add space to if 2023-06-06 19:08:42 -04:00
Boris Kuschel
068b1fbbcc Add ability to ignore index 2023-06-06 19:08:42 -04:00
Robert Schulze
42c0547895
Remove clang-tidy exclude 2023-06-06 19:25:43 +00:00
Robert Schulze
a74d3ca328
Fix style check 2023-06-06 17:06:47 +00:00
Robert Schulze
2a756a7e6c
Cosmetics: Make default tree count / distance function constants 2023-06-06 17:05:23 +00:00
Nikita Mikhaylov
e87348010d
Rework loading and removing of data parts for MergeTree tables. (#49474)
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2023-06-06 14:42:56 +02:00
Robert Schulze
2c5c0c5c9f
Cosmetics: Remove exception path for something checked elsewhere already 2023-06-06 08:14:50 +00:00
Robert Schulze
0b18b75bec
Cosmetics: Use abbreviated syntax to read settings 2023-06-06 08:06:03 +00:00
Michael Kolupaev
9f80900d6f Changes related to an internal feature 2023-06-05 18:20:38 -07:00
Robert Schulze
8f60423daa
Cosmetics: more constness 2023-06-05 10:59:41 +00:00
Robert Schulze
cdb5997339
Cosmetics: add assert 2023-06-05 10:25:25 +00:00
Robert Schulze
06329fb08b
Minor: Make unique by sort/erase (should be a bit faster) 2023-06-05 09:33:02 +00:00
Robert Schulze
397715bfa5
Cosmetics: comp_dist --> comparison_distance 2023-06-05 09:32:02 +00:00
Robert Schulze
4e9a533178
Cosmetics: condition --> ann_condition 2023-06-05 09:31:59 +00:00
Robert Schulze
146668a850
Cosmetics: query_type --> type 2023-06-05 09:31:52 +00:00
Robert Schulze
0c26123fd5
Cosmetics: limit_restriction --> max_limit_for_ann_queries 2023-06-05 09:31:49 +00:00
Robert Schulze
8213e366fa
Cosmetics: Remove absolute namespace qualification of Annoy library internals, pt. II 2023-06-05 09:31:46 +00:00
Robert Schulze
879b70a594
CommonANNIndexes.h/cpp --> ApproximateNearestNeighborIndexesCommon.h/cpp 2023-06-05 09:31:43 +00:00
Robert Schulze
55256f4664
Cosmetics: Fix typo 2023-06-05 09:31:41 +00:00
Robert Schulze
6580d2c326
Cosmetics: castMetricFromStringToType --> stringToMetric 2023-06-05 09:31:35 +00:00
Robert Schulze
8cc382121a
Cosmetics: Update comments 2023-06-05 09:31:33 +00:00
Robert Schulze
6fe208832d
Cosmetics: target vector --> reference vector 2023-06-05 09:31:26 +00:00
Robert Schulze
567d54a268
Cosmetics: more constness 2023-06-05 09:31:05 +00:00
Robert Schulze
999e4c3306
Cosmetics: Less generic variable naming 2023-06-05 09:31:03 +00:00
Robert Schulze
662b0fb822
Cosmetics: Unwrap common ANN code from nested namespace 2023-06-05 09:30:58 +00:00
Robert Schulze
f800940639
Cosmetics: Shuffle statements 2023-06-05 09:30:51 +00:00
Robert Schulze
6d3431d2ff
Cosmetics: Sort includes 2023-06-05 09:30:44 +00:00
Robert Schulze
a973ac5dbb
Replace weird generic ANN setting by Annoy-specific parameter 2023-06-05 09:30:35 +00:00
Robert Schulze
18304f5aef
Check distance function in CREATE TABLE instead of first INSERT 2023-06-05 09:29:35 +00:00
Robert Schulze
03b6856556
Cosmetics: distance_name --> distance_function 2023-06-05 09:29:32 +00:00
Robert Schulze
f577bf35fc
Simplify Annoy parameterization 2023-06-05 09:29:28 +00:00
Robert Schulze
5d871c7fa0
Cosmetics: +comments 2023-06-05 09:29:26 +00:00
Robert Schulze
62c8b9a7a1
Cosmetics: Factorize throw into lambda 2023-06-05 09:29:22 +00:00
Robert Schulze
0854d91372
Cosmetics: Rename variable 2023-06-05 09:29:19 +00:00
Robert Schulze
828155ebef
Cosmetics: Move assertIndexColumnsType() into annoyIndexValidator() 2023-06-05 09:29:15 +00:00
Robert Schulze
15c9e235c4
Cosmetics: add some comments + minor changes 2023-06-05 09:29:09 +00:00
Robert Schulze
68ad903f4c
Cosmetics: unglue * and & 2023-06-05 09:29:07 +00:00
Robert Schulze
2b74daaa17
Cosmetics: make input switch a bit more idiomatic 2023-06-05 09:29:03 +00:00
Robert Schulze
a3d4ede26c
Cosmetics: Update exception messages 2023-06-05 09:29:01 +00:00
Robert Schulze
7608e08eed
Cosmetics: more constness 2023-06-05 09:28:58 +00:00
Robert Schulze
423f692282
Cosmetics: Remove unnecessary toString() 2023-06-05 09:28:55 +00:00
Robert Schulze
3b77e40902
Cosmetics: Remove dots from exception messages 2023-06-05 09:28:53 +00:00
Robert Schulze
c5ededdc5b
Cosmetics: Switch arguments in MTIConditionAnnoy ctor 2023-06-05 09:28:50 +00:00
Robert Schulze
594572b0de
Cosmetics: AnnoyIndex --> AnnoyIndexWithSerialization 2023-06-05 09:28:47 +00:00
Robert Schulze
dc88d4e742
Cosmetics: Factorize repeated typedefs into a single typedef 2023-06-05 09:28:44 +00:00
Robert Schulze
e373cf682a
Cosmetics: Unwrap Annoy index from nested namespace 2023-06-05 09:28:41 +00:00
Robert Schulze
f8c1f2bd33
Cosmetics: Remove absolute namespace qualification of Annoy library internals 2023-06-05 09:28:38 +00:00
Robert Schulze
a8bf7af291
Cosmetics: Move ErrorCodes to top 2023-06-05 09:28:35 +00:00
Robert Schulze
4631595cf6
Cosmetics: number_of_trees --> trees 2023-06-05 09:28:32 +00:00
Robert Schulze
1018677f46
Cosmetics: Move ctors into cpp file 2023-06-05 09:28:29 +00:00
Robert Schulze
edad92a7f2
Cosmetics: Minor aesthetic fixes 2023-06-05 09:28:26 +00:00
Robert Schulze
3275629230
Cosmetics: Remove parentheses in single statement if/for/while 2023-06-05 09:28:24 +00:00
Robert Schulze
3657ef05ff
Cosmetics: Fix indentation 2023-06-05 09:28:19 +00:00
Alexey Milovidov
3c5bd78856 Fix typo 2023-06-05 06:13:39 +02:00
Alexey Milovidov
881bdbf839
Merge pull request #50153 from amosbird/fix_44504
Fix invalid index analysis for date related keys
2023-06-05 05:00:20 +03:00
Alexey Milovidov
5fc8838b04
Update KeyCondition.cpp 2023-06-05 04:58:29 +03:00
Alexey Milovidov
3b8c781b2c
Merge pull request #50448 from ClickHouse/rm_parts_from_zk_paranoid
Paranoid fix for removing parts from ZooKeeper
2023-06-05 04:42:15 +03:00
Amos Bird
e24c9267bc
fix 2023-06-04 20:06:27 +08:00
Amos Bird
97bd3f0483
Proper mutation of skip indices and projections 2023-06-04 18:32:08 +08:00
Alexey Milovidov
9e938d7eec
Merge pull request #49287 from nickitat/optimize_reading2
Optimise hot reading from remote tables
2023-06-02 23:51:57 +03:00
Alexander Tokmakov
4209ccfc08 fix 2023-06-02 17:42:04 +02:00
Alexander Tokmakov
e148c60d5a
Fixes for MergeTree with readonly disks (#50244)
* fixes for MergeTree with readonly disks

* Automatic style fix

* Update test.py

* Automatic style fix

* Update test.py

* Update test.py

* Automatic style fix

* Update test.py

---------

Co-authored-by: robot-clickhouse <robot-clickhouse@users.noreply.github.com>
Co-authored-by: alesapin <alesapin@clickhouse.com>
2023-06-02 16:18:32 +03:00
Alexey Milovidov
31773d7eee
Merge pull request #50432 from azat/fix-min-for-seek
Fix merge_tree_min_rows_for_seek/merge_tree_min_bytes_for_seek for data skipping indexes
2023-06-02 04:09:35 +03:00
Alexey Milovidov
60dccff77c
Merge pull request #50177 from amosbird/fix_50094
Fix broken index analysis when binary operator contains a null constant argument
2023-06-02 01:29:03 +03:00
Alexander Tokmakov
f62faaedc3 paranoid fix for removing parts from zk 2023-06-01 21:20:39 +02:00
Azat Khuzhin
53eb360ac2 Fix merge_tree_min_rows_for_seek/merge_tree_min_bytes_for_seek for data skipping indexes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-06-01 15:04:16 +02:00
SmitaRKulkarni
06432929a7
Merge pull request #50339 from ClickHouse/43983_Updated_to_hold_lock_fetch_part
Improved fetch part by holding directory lock longer
2023-06-01 13:42:34 +02:00
Nikita Mikhaylov
3543d95980
Parallel replicas always skip unavailable ones (#50293) 2023-05-31 22:10:33 +02:00
SmitaRKulkarni
123cd505ee
Merge branch 'master' into 43983_Updated_to_hold_lock_fetch_part 2023-05-31 21:59:55 +02:00
Alexander Tokmakov
a18b998076
Merge branch 'master' into rmt_better_background_tasks_scheduling 2023-05-31 19:47:29 +03:00
Alexander Tokmakov
82e1d5ae67 Merge branch 'master' into rmt_better_background_tasks_scheduling 2023-05-30 17:40:13 +02:00
Smita Kulkarni
fe944a55dc Updated to hold temporary_directory_lock till part is fetched, renamed and committed 2023-05-30 13:30:47 +02:00
Sema Checherinda
2d2b411c26 fix build 2023-05-30 12:26:20 +02:00
Sema Checherinda
0b4ea3e2e1 remove reminder comments 2023-05-30 12:26:20 +02:00
Sema Checherinda
a5dcd8dabb do not call finalize in d-tor MergedBlockOutputStream::Finalizer 2023-05-30 12:26:20 +02:00
Sema Checherinda
fe3939287b add test, fix .gin_sid files 2023-05-30 12:26:20 +02:00
Nikita Taranov
be62c8faba fix build 2023-05-29 15:27:39 +02:00
Nikita Taranov
a3652f1727 Merge branch 'master' into optimize_reading2 2023-05-29 15:26:18 +02:00
alesapin
3a3cee586a
Merge pull request #50257 from CurtizJ/useless-refactoring
Yet another refactoring
2023-05-28 21:42:16 +02:00
Nikita Taranov
42a9072888 Merge branch 'master' into optimize_reading2 2023-05-28 18:04:44 +02:00
Sergei Trifonov
0d1f2e297b
Unify priorities: lower value means higher priority (#50205) 2023-05-26 15:55:30 +02:00
Anton Popov
612173e734 refactoring near alter conversions 2023-05-25 22:54:54 +00:00
Kseniia Sumarokova
f1a3c9cfd5
Merge pull request #50109 from kssenii/abstract-async-prefetched-buffer
Make async prefetched buffer work with arbitrary impl
2023-05-25 15:06:44 +02:00
Nikita Mikhaylov
1c3b6738f4
Fixes for parallel replicas (#50195) 2023-05-25 14:41:04 +02:00
Alexander Tokmakov
d8f936987e Merge branch 'master' into rmt_better_background_tasks_scheduling 2023-05-25 12:36:41 +02:00
何李夫
e4c8c4cecf
Add zookeeper name in endpoint id (#49780)
* Add zookeeper name in endpoint id

When we migrate a replicated table from one zookeeper cluster to
another (the reason why we migration is that zookeeper's load is
too high), we will create a new table with the same zpath, but it
will fail and the old table will be in trouble.

Here is some infomation:
1.old table:
  CREATE TABLE a1 (`id` UInt64)
  ENGINE = ReplicatedMergeTree('/clickhouse/tables/default/a1/{shard}', '{replica}')
  ORDER BY (id);
2.new table:
  CREATE TABLE a2 (`id` UInt64)
  ENGINE = ReplicatedMergeTree('aux1:/clickhouse/tables/default/a1/{shard}', '{replica}')
  ORDER BY (id);
3.error info:
  <Error> executeQuery: Code: 220. DB::Exception: Duplicate interserver IO endpoint:
          DataPartsExchange:/clickhouse/tables/default/a1/01/replicas/02.
          (DUPLICATE_INTERSERVER_IO_ENDPOINT)
  <Error> InterserverIOHTTPHandler: Code: 221. DB::Exception: No interserver IO endpoint
          named DataPartsExchange:/clickhouse/tables/default/a1/01/replicas/02.
          (NO_SUCH_INTERSERVER_IO_ENDPOINT)

* Revert "Add zookeeper name in endpoint id"

This reverts commit 9deb75b249619b7abdd38e3949ca8b3a76c9df8e.

* Add zookeeper name in endpoint id

When we migrate a replicated table from one zookeeper cluster to
another (the reason why we migration is that zookeeper's load is
too high), we will create a new table with the same zpath, but it
will fail and the old table will be in trouble.

* Fix incompatible with a new setting

* add a test, fix other issues

* Update 02442_auxiliary_zookeeper_endpoint_id.sql

* Update 02735_system_zookeeper_connection.reference

* Update 02735_system_zookeeper_connection.sql

* Update run.sh

* Remove the 'no-fasttest' tag

* Update 02442_auxiliary_zookeeper_endpoint_id.sql

---------

Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>
2023-05-25 12:50:14 +03:00
alesapin
7c0c49c9d2
Merge pull request #50154 from hanfei1991/hanfei/fix-modify-order-by
do not allow modify order by when there are no order by cols
2023-05-24 15:01:38 +02:00