Commit Graph

45 Commits

Author SHA1 Message Date
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
Nikita Mikhaylov
954e3b724c
Speedup outdated parts loading (#49317) 2023-05-03 18:56:45 +02:00
Sema Checherinda
1666527dae do listing combined with getting size in one thread 2023-02-26 12:09:05 +01:00
Sema Checherinda
0c9643f1ed make listing in parrallel as well 2023-02-25 16:27:27 +01:00
Nikolai Kochetov
57b5f9e7d7 Fix case with no detached parts for table. 2023-02-25 13:33:20 +01:00
Sema Checherinda
e2bfa83429 cancel workers when exception 2023-02-25 13:33:20 +01:00
Sema Checherinda
08dc874a37 do not run support threads if no tasks left 2023-02-25 13:33:20 +01:00
Sema Checherinda
e5cbe4311e create limites count of support threads for a block 2023-02-25 13:33:20 +01:00
Sema Checherinda
ef0c1841af work with comments on review 2023-02-25 13:33:20 +01:00
Sema Checherinda
3b58249320 pack several files in one thread 2023-02-25 13:33:20 +01:00
Sema Checherinda
8abc1f0d5d fix build and style 2023-02-25 13:33:20 +01:00
Sema Checherinda
dce319e1c5 add multitreading for StorageSystemDetachedParts 2023-02-25 13:33:20 +01:00
Anton Popov
8e3698c91f refactoring of code near merge tree parts 2023-01-25 17:34:09 +00:00
kssenii
6499e8e687 Calculate only required column in system.detached_parts 2023-01-11 16:45:38 +01:00
Kseniia Sumarokova
4fc7926c16
Merge branch 'master' into system_table_add_column 2022-11-07 23:36:57 +01:00
xiedeyantu
d4cdc38b71 better 2022-11-07 22:49:58 +08:00
xiedeyantu
61563d4f19 better 2022-10-24 11:52:20 +08:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
xiedeyantu
32ad28cbe5 optimize code 2022-10-19 17:37:26 +08:00
xiedeyantu
b26361c647 fix test 2022-10-17 23:02:39 +08:00
xiedeyantu
9e62570d61 fix test 2022-10-17 22:57:11 +08:00
xiedeyantu
8ebe01d9cf system.detached_parts add column bytes_on_disk and path 2022-10-14 11:43:42 +08:00
Nikolai Kochetov
333fd09dbf Fixing build. 2022-05-24 19:29:00 +00:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
Anton Popov
6f4d9a53b2 Merge remote-tracking branch 'origin/sparse-serialization' into HEAD 2021-12-01 15:54:33 +03:00
Alexander Tokmakov
1ab8b5d4df fix segfault on attach parititon 2021-11-25 13:04:39 +03:00
Anton Popov
a20922b2d3 Merge remote-tracking branch 'origin/sparse-serialization' into HEAD 2021-11-09 15:36:25 +03:00
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Anton Popov
3ed7f5a6cc dynamic subcolumns: add snapshot for storage 2021-07-09 06:15:41 +03:00
Maksim Kita
67e9b85951 Merge ext into common 2021-06-16 23:28:41 +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
Alexey Milovidov
5314185e25 Merge branch 'master' into azat-optimize_skip_unused_shards-optimization 2020-11-08 00:17:59 +03:00
Alexey Milovidov
5b482f4191 Cleanups 2020-10-10 19:31:10 +03:00
Azat Khuzhin
b838214a35 Pass non-const SelectQueryInfo (and drop mutable qualifiers) 2020-10-02 22:42:35 +03:00
Alexander Tokmakov
03eb8f5f21 fix sync 2 2020-08-14 16:51:32 +03:00
Alexander Tokmakov
128b19fdba Merge branch 'master' into use_atomic_engine_for_system_db 2020-08-14 13:47:44 +03:00
Alexander Tokmakov
0f1c4bc9c4 attach all system tables 2020-08-13 20:09:40 +03:00
Alexander Tokmakov
a6ff049eec use Atomic for system database 2020-08-12 23:40:13 +03:00
Nikolai Kochetov
20e63d2271 Refactor Pipe [part 6] 2020-08-06 15:24:05 +03:00
alesapin
c9fa5d2ec3 Better naming 2020-06-19 18:39:41 +03:00
alesapin
1ddeb3d149 Buildable getSampleBlock in StorageInMemoryMetadata 2020-06-16 18:51:29 +03:00
alesapin
36ba0192df Metadata in read and write methods of IStorage 2020-06-15 22:08:58 +03:00
alesapin
af2fe2ba55 Compilable setColumns, setConstraints, setIndices 2020-06-15 19:55:33 +03:00
Alexey Milovidov
03e17405cd Checkpoint 2020-04-22 10:03:43 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00