Commit Graph

11 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
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Alexander Tokmakov
3bca886174 remove some trash 2021-09-17 22:29:10 +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
bharatnc
1e579ac375 Fixes to code, build and style checks 2021-01-07 11:10:49 -08:00
bharatnc
6f0009ff52 extract cluster_name from DDLQuery 2021-01-07 11:10:41 -08:00
bharatnc
9cddd22a7a review fixes 2021-01-07 11:10:41 -08:00
bharatnc
cc568a1d2c DDLWorkerQueueTable - load distributed_ddl.path from server config 2021-01-07 11:10:40 -08:00
bharatnc
2c1f9e2a77 DDLWorkerQueueTable - add intial scaffolding 2021-01-07 11:10:40 -08:00