Commit Graph

23 Commits

Author SHA1 Message Date
Yakov Olkhovskiy
2e34b384c1 update tcp protocol, add quota_key 2022-08-03 15:44:08 -04:00
Nikolai Kochetov
56feef01e7 Move some resources 2022-05-20 19:49:31 +00:00
Maksim Kita
ac3cb8c12b CacheDictionary dictionary source access race fix 2021-12-15 15:55:28 +03:00
Vitaly Baranov
bdf640326b Clickhouse dictionary source no longer keep a session after creation.
This fixes tsan alert on shutdown.
2021-11-03 16:12:39 +03:00
Vitaly Baranov
3b09640d94 Use sessions more. 2021-08-19 02:22:09 +03:00
Maksim Kita
30a95e77a7 Database dictionaries custom query support 2021-08-11 11:18:21 +03:00
Nikolai Kochetov
8d14f2ef8f Streams -> Processors for dicts, part 1. 2021-08-04 20:58:18 +03:00
Maksim Kita
9d0c2f83f8 ClickHouse dictionary source secure setting added documentation 2021-07-07 22:14:30 +03:00
alexey-milovidov
05d1af153c
Merge branch 'master' into rename-const-context-ptr 2021-06-12 03:25:09 +03:00
Maksim Kita
7515e2db4f Dictionary sources add update lag option 2021-06-10 11:34:57 +03:00
Nikolai Kochetov
dbaa6ffc62 Rename ContextConstPtr to ContextPtr. 2021-06-01 15:20:52 +03:00
Nikolai Kochetov
afc1fe7f3d Make ContextPtr const by default. 2021-05-31 17:49:02 +03:00
Alexander Kuzmenkov
3f57fc085b remove mutable context references from functions interface
Also remove it from some visitors.
2021-05-28 19:45:37 +03:00
Azat Khuzhin
920378a12a Fix google-default-arguments in IDictionarySource with loadAllWithSizeHint() 2021-05-10 07:41:49 +03:00
Azat Khuzhin
808d1a0215 Reimplement preallocate for hashed/sparse_hashed dictionaries
It was initially implemented in #15454, but was reverted in #21948 (due
to higher memory usage).

This implementation differs from the initial, since now there is
separate attribute to enable preallocation, before it was done
automatically, but this has problems with duplicates in the source.

Plus this implementation does not uses dynamic_cast, instead it extends
IDictionarySource interface.
2021-05-10 07:41:48 +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
Maksim Kita
07d5a1ec21 ClickHouseDictionarySource loop fix 2021-04-03 00:40:07 +03:00
Maksim Kita
45879472d3 DirectDictionary updated 2021-03-09 23:49:34 +03:00
vdimir
1dce20e5da
Default host, port and user parameters for source(clickhouse(...)) 2020-11-14 16:44:45 +03:00
Azat Khuzhin
064f901ea8 Add ability to preallocate hashtables for hashed/sparsehashed dictionaries
preallocation can be used only when we know number of rows, and for this
we need:
- source clickhouse
- no filtering (i.e. lack of <where>), since filtering can filter
  too much rows and eventually it may allocate memory that will
  never be used.

For sparse_hash the difference is quite significant, preallocated
sparse_hash hashtable allocates ~33% faster (7.5 seconds vs 5 seconds
for insert, and the difference is more significant for higher number of
elements):

    $ ninja bench-sparse_hash-run
    [1/1] cd /src/ch/hashtable-bench/.cmake && ...ch/hashtable-bench/.cmake/bench-sparse_hash
    sparse_hash/insert: 7.574 <!--
    sparse_hash/find  : 2.14426
    sparse_hash/maxrss: 174MiB
    sparse_hash/time:   9710.51 msec (user+sys)

    $ time ninja bench-sparse_hash-preallocate-run
    [1/1] cd /src/ch/hashtable-bench/.cmake && ...-bench/.cmake/bench-sparse_hash-preallocate
    sparse_hash/insert: 5.0522 <!--
    sparse_hash/find  : 2.14024
    sparse_hash/maxrss: 174MiB
    sparse_hash/time:   7192.06 msec (user+sys)

P.S. the difference for sparse_hashed dictionary with 4e9 elements
(uint64, uint16) is ~18% (4975.905 vs 4103.569 sec)

v2: do not reallocate the dictionary from the progress callback
    Since this will access hashtable in parallel.
v3: drop PREALLOCATE() and do this only for source=clickhouse and empty
    <where>
2020-10-09 22:28:14 +03:00
Alexey Milovidov
52c3857225 Fix server restart after stress test 2020-08-15 06:10:57 +03:00
Артем Стрельцов
741775a12f fixed some remarks from review 2020-04-17 22:54:53 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00