Commit Graph

41 Commits

Author SHA1 Message Date
Robert Schulze
777b5bc15b
Don't let storages inherit from boost::noncopyable
... IStorage has deleted copy ctor / assignment already
2022-05-03 09:07:08 +02: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
fcdebea925 Merge remote-tracking branch 'upstream/master' into HEAD 2022-02-25 13:41:30 +03:00
vdimir
99ca89c0ca
Fix StorageJoin and Asof or join_use_nulls in pipeline 2022-02-14 14:14:27 +00:00
Anton Popov
99ebabd822 Merge remote-tracking branch 'upstream/master' into HEAD 2021-12-17 19:02:29 +03:00
SuperDJY
5d7dfc6eb9
fix storage join settings with persistency (#32066) 2021-12-03 12:06:58 +03:00
Anton Popov
a20922b2d3 Merge remote-tracking branch 'origin/sparse-serialization' into HEAD 2021-11-09 15:36:25 +03:00
Vladimir C
dc4bb920d3
Merge branch 'master' into join_deadlock 2021-10-11 10:18:17 +03:00
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Raúl Marín
f58742014c Consistent naming 2021-09-30 11:05:21 +02:00
Raúl Marín
0ee5c0bff5 Use RWLock in StorageJoin to avoid deadlocks 2021-09-29 19:30:07 +02:00
Anton Popov
e36736b50c Merge remote-tracking branch 'origin/sparse-serialization' into HEAD 2021-08-02 22:52:02 +03:00
Nikolai Kochetov
2dc5c89b66 Update Storage::write 2021-07-23 17:25:35 +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
Anton Popov
f9cf7c46e1 better lock in StorageJoin 2021-06-01 02:22:05 +03:00
Anton Popov
7f27305787 Merge branch 'join_table_mutation' of git://github.com/foolchi/ClickHouse into merging-23260 2021-05-31 23:52:44 +03:00
feng lv
4ffe199d39 Implement table comments 2021-04-23 12:18:23 +00:00
fuqi
31f2c65e4f support join table mutation 2021-04-18 17:38:50 +08: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
vdimir
6f864ddb42
Minor changes in Hash/StorageJoin, add TableLockHolder to ExecutableFunctionJoinGet 2021-02-25 14:21:06 +03:00
vdimir
2f70e895fc
Update StorageJoin locking
Move joinGet into StorageJoin

Protect JoinSource with lock, add test

Add comments about locking logic
2021-02-25 12:31:22 +03:00
vdimir
6aa4791be2
Remove unused *Locked methods from HashJoin, add comments 2021-02-24 19:19:04 +03:00
vdimir
6cc2fb5e9f
Try to fix race in storage join: block parralel inserts 2021-02-20 18:00:59 +03:00
Pervakov Grigorii
4edbb42ba1 Use IDisk in Set and Join storages 2020-12-16 14:58:44 +03: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
Alexey Milovidov
5314185e25 Merge branch 'master' into azat-optimize_skip_unused_shards-optimization 2020-11-08 00:17:59 +03:00
hchen9
d9bc486c0e Fix StorageJoin and StorageSet 2020-10-25 20:57:19 -07:00
Azat Khuzhin
4d1385ef19 Add total_rows/total_bytes support for Set/Join 2020-10-23 21:11:55 +03:00
Azat Khuzhin
b838214a35 Pass non-const SelectQueryInfo (and drop mutable qualifiers) 2020-10-02 22:42:35 +03:00
Vxider
c9249f77c7 rename persistency to persistent 2020-09-18 20:58:27 +08:00
Vxider
0c535062fc rename disable_persistency to persistency 2020-09-18 20:48:55 +08:00
Vxider
1c82d2eb23 use table-level setting 2020-09-15 17:16:10 +08:00
Vxider
cbf8282701 add disable_set_and_join_persistency 2020-09-13 23:11:18 +08:00
Nikolai Kochetov
2cca4d5fcf Refactor Pipe [part 2]. 2020-08-03 16:54:14 +03:00
alesapin
d79982f497 Better locks in Storages 2020-06-18 19:10:47 +03:00
alesapin
aab4ce6394 Truncate with metadata 2020-06-18 13:29:13 +03:00
alesapin
36ba0192df Metadata in read and write methods of IStorage 2020-06-15 22:08:58 +03:00
Artem Zuikov
8297683972
renames: AnalyzedJoin -> TableJoin, Join -> HashJoin (#10065) 2020-04-07 12:48:47 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00