Commit Graph

55715 Commits

Author SHA1 Message Date
Ilya Yatsishin
8f280aa1c6
Merge pull request #19337 from filimonov/kafka_wo_ssl
Allow building librdkafka without ssl
2021-01-22 15:22:30 +03:00
Alexander Kuzmenkov
6296cc6b09
Merge pull request #19361 from ClickHouse/aku/reconnect
Reconnect after client errors
2021-01-22 13:32:56 +03:00
Alexander Kuzmenkov
8b9105bf39
Merge pull request #18446 from azat/constant-folding
Fix constant folding when the result is unknown
2021-01-22 13:26:24 +03:00
Alexander Kuzmenkov
3048fa8414
Update run-fuzzer.sh 2021-01-22 13:21:29 +03:00
Nikolai Kochetov
90e9c63fa4
Merge pull request #19316 from ClickHouse/fix-now64
Refactor now64
2021-01-22 13:21:16 +03:00
Alexander Kuzmenkov
8c0e207c9c
Update run-fuzzer.sh 2021-01-22 13:20:45 +03:00
Alexander Kuzmenkov
b58a696b24
Merge pull request #19379 from azat/Buffer-less-lock-contention
Reduce lock contention for multiple layers of the Buffer engine
2021-01-22 13:17:34 +03:00
Maksim Kita
89e8feb924
Merge pull request #19377 from kitaisreal/mac-os-fixed-build-issues
MacOS fixed build issues
2021-01-22 13:11:22 +03:00
Ilya Yatsishin
c54c47405b
Merge pull request #19363 from qoega/sqlancer-rename
SQLancer binary changed its name
2021-01-22 12:35:06 +03:00
Ilya Yatsishin
eb4163c1fa
Merge pull request #19404 from achimbab/add_adopter
Add kakao to adopters.md
2021-01-22 10:29:08 +03:00
achimbab
fe5d02a06f Add kakao to adopters.md 2021-01-22 13:00:47 +09:00
alexey-milovidov
4e11e7cfa9
Merge pull request #18772 from azat/optimize-memory-tracking-fix
[RFC] Fix memory tracking for OPTIMIZE TABLE/merges
2021-01-22 03:48:06 +03:00
alexey-milovidov
52f570c28a
Merge pull request #19372 from davenger/posix_open_fix
Fix IDisk::open parameters to match posix open
2021-01-22 03:40:26 +03:00
alexey-milovidov
4b857c0879
Merge pull request #19195 from olgarev/revolg-DOCSUP-5082-Docs_for_cache_types
DOCSUP-5082: Docs for cache types
2021-01-22 03:22:48 +03:00
Alexander Kuzmenkov
2eba7413e1 remove extra newline 2021-01-22 02:42:24 +03:00
Alexander Kuzmenkov
963699d9c8
Update run-fuzzer.sh 2021-01-22 02:26:49 +03:00
Alexander Kuzmenkov
b0fca03d79
Update run-fuzzer.sh 2021-01-22 01:13:48 +03:00
Alexey Milovidov
dcd03eb155 Remove useless file 2021-01-22 00:57:00 +03:00
Olga Revyakina
cf5c0dad94 Minor fix 2021-01-21 23:56:29 +03:00
alesapin
5037d3befd
Merge pull request #19355 from ClickHouse/fix_race_test_keeper
Fix race condition in TestKeeperHandler on session finish
2021-01-21 23:53:18 +03:00
alexey-milovidov
1883bc546a
Merge pull request #19357 from ClickHouse/values-ubsan
Fix potential nullptr dereference in table function VALUES
2021-01-21 23:34:41 +03:00
alexey-milovidov
37c345f55e
Merge pull request #19347 from ClickHouse/array-element-ubsan
Avoid UBSan report in arrayElement
2021-01-21 23:34:19 +03:00
Alexander Kuzmenkov
56687b2d84
Update run.sh 2021-01-21 23:29:01 +03:00
Alexander Kuzmenkov
e9e3314026
Update run-fuzzer.sh 2021-01-21 23:05:35 +03:00
Alexander Kuzmenkov
71e663701d update the tests 2021-01-21 22:56:28 +03:00
Maksim Kita
e06383e0ae Darwin fixed build issues 2021-01-21 22:32:17 +03:00
Azat Khuzhin
b0a80af888 Reduce lock contention for multiple layers of the Buffer engine
Otherwise you can see something like this for the following query:

    ```sql
    WITH
        arrayMap(x -> demangle(addressToSymbol(x)), s.trace) AS trace_array,
        arrayStringConcat(trace_array, '\n') AS trace_string
    SELECT
        p.thread_id,
        p.query_id,
        p.query,
        trace_string
    FROM
    (
        SELECT
            query_id,
            query,
            arrayJoin(thread_ids) AS thread_id
        FROM system.processes
    ) AS p
    INNER JOIN system.stack_trace AS s ON p.thread_id = s.thread_id
    ORDER BY p.query_id ASC
    SETTINGS enable_global_with_statement = 0, allow_introspection_functions = 1
    FORMAT PrettyCompactNoEscapes
    ```

Lots of the following:

    ```sql
    INSERT INTO buffer (...) VALUES

    __lll_lock_wait
    pthread_mutex_lock
    std::__1::mutex::lock()
    DB::StorageBuffer::reschedule()
    DB::BufferBlockOutputStream::write(DB::Block const&)
    ```

That will wait one of this:

    ```
    INSERT INTO buffer (...) VALUES

    ...
    DB::PushingToViewsBlockOutputStream::write(DB::Block const&)
    DB::AddingDefaultBlockOutputStream::write(DB::Block const&)
    DB::SquashingBlockOutputStream::finalize()
    DB::SquashingBlockOutputStream::writeSuffix()
    DB::PushingToViewsBlockOutputStream::writeSuffix()
    DB::StorageBuffer::writeBlockToDestination(DB::Block const&, std::__1::shared_ptr<DB::IStorage>)
    DB::StorageBuffer::flushBuffer(DB::StorageBuffer::Buffer&, bool, bool, bool)
    ```

P.S. we cannot simply unlock the buffer during flushing, see comments in
the code
2021-01-21 22:09:24 +03:00
Azat Khuzhin
82e7e7d9cb Fix constant folding for expressions depends from subqueries result
Do not use subquery result, when value is unknown, for constant folding.

v2: fix simple subqueries, fixes 00597_push_down_predicate.
v3:
- use identity over introducing yet another cast analog (as suggested by @akuzm)
- simpler suitable_for_const_folding check
v4: use identity(cast()) since only cast() can provide corrent type (for
data types that does not have it's own type, i.e. DateTime)
v5: do not optimize consts if only_analyze isset, regardless the block
content
2021-01-21 21:26:50 +03:00
Azat Khuzhin
ea7528b853 identity: mark it as non suitable for constant folding 2021-01-21 21:22:23 +03:00
Azat Khuzhin
82f6c642ae identity: simple functions in oneline (coding style) 2021-01-21 21:22:23 +03:00
Azat Khuzhin
44011061b5 Add missing DROP TABLE at the beginning of 01268_mv_scalars test 2021-01-21 21:22:23 +03:00
Azat Khuzhin
c68f7cd5b1 Measure time that spend during flush of the Buffer to the underlying 2021-01-21 21:11:39 +03:00
Nikita Mikhaylov
dca0cbf4eb
Merge pull request #19313 from nikitamikhaylov/another-race-cache-dictionary
Fixed race between copy-constructor and addQueryAccessInfo
2021-01-21 21:02:36 +03:00
Nikita Mikhaylov
b93732e441
Merge pull request #18788 from hexiaoting/map_functions
Introduce mapContains, mapKeys, mapValues functions for Map data type
2021-01-21 21:02:03 +03:00
Alexander Kuzmenkov
eb7b87ee8d update tests 2021-01-21 21:01:32 +03:00
Nikita Mikhaylov
e8a9768bd0
Update map.cpp 2021-01-21 20:47:57 +03:00
Yatsishin Ilya
a623084eb0 Merge remote-tracking branch 'origin' into sqlancer-rename 2021-01-21 20:36:52 +03:00
Alexander Gololobov
0a155ee2f1 Fix IDisk::open parameters to match posix open 2021-01-21 19:38:13 +03:00
Alexander Kuzmenkov
36a42a1f96 update tests 2021-01-21 18:30:51 +03:00
Yatsishin Ilya
4ac080b2ca SQLancer binary changed its name 2021-01-21 17:53:28 +03:00
Alexander Kuzmenkov
ec8ff21526 Reconnect after client errors 2021-01-21 17:28:46 +03:00
alexey-milovidov
062f00aa5d
Merge pull request #19290 from azat/dist-broken-on-EOF-fix
Do not mark file for distributed send as broken on EOF
2021-01-21 17:00:36 +03:00
alexey-milovidov
669e55f5e0
Merge pull request #19318 from qoega/issue-template-sanitizer
Add Sanitizer report issue template
2021-01-21 16:51:45 +03:00
Alexey Milovidov
3b2a87b57e Update SECURITY.md (outdated long time ago) 2021-01-21 16:48:28 +03:00
Alexey Milovidov
375db8ce7e Update reference 2021-01-21 16:42:47 +03:00
tavplubix
0ef00bc4a6
Merge pull request #19023 from sevirov/sevirov-DOCSUP-4966-add_multiword_data_types
DOCSUP-4966: Add some multiword data types
2021-01-21 16:07:25 +03:00
Nikita Mikhaylov
3634e87d16
Merge pull request #19090 from ka1bi4/romanzhukov-DOCSUP-5272-translation
DOCSUP-5272: Edit and translate to RU: primary key in create table statement.
2021-01-21 15:35:22 +03:00
alexey-milovidov
7370335f87
Merge pull request #19339 from ClickHouse/fix-ipv4-formatting
Fix bad formatting of IPv4 addresses
2021-01-21 15:20:24 +03:00
Alexey Milovidov
56012402e2 Fix potential nullptr dereference in table function VALUES 2021-01-21 15:19:00 +03:00
alexey-milovidov
08dc5ebfa7
Merge pull request #19343 from ucasFL/sleep
fix sleep with infinite input
2021-01-21 15:04:30 +03:00