Commit Graph

67793 Commits

Author SHA1 Message Date
Ivan Blinkov
d1a63a5506
Update the Slack link 2021-07-01 21:18:28 +03:00
Kruglov Pavel
e23cf79338
Merge pull request #25596 from ildus/map_add_for_maps
Support Map type in mapAdd and mapSubtract
2021-07-01 21:08:07 +03:00
kssenii
4c8d82001f Fix checks 2021-07-01 17:52:21 +00:00
kssenii
9977629c89 Fix 2021-07-01 17:26:15 +00:00
kssenii
4d4ba4b5b1 More types for json functions 2021-07-01 16:46:34 +00:00
feng lv
9ad405cae8 update
update

fix test

fix test
2021-07-01 15:19:36 +00:00
Maksim Kita
6bbec92614
Merge pull request #25837 from azat/perf-query_log-map-fix
Fix performance tests after converting ProfileEvents to Map type
2021-07-01 16:24:42 +03:00
alesapin
7792b09911 Reset counter if background pool is full 2021-07-01 16:10:07 +03:00
feng lv
fe22563465 fix conflict 2021-07-01 13:09:33 +00:00
alesapin
1a4ccab8e6 Fix style 2021-07-01 15:12:27 +03:00
Ildus Kurbangaliev
c86739794f Change error code in mapAdd 2021-07-01 13:41:12 +02:00
Ildus Kurbangaliev
f56ae8f9cd
Apply suggestions from code review
Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
2021-07-01 13:38:13 +02:00
mergify[bot]
98fa9f7951
Merge branch 'master' into better_remove_empty_parts 2021-07-01 11:32:43 +00:00
Kruglov Pavel
0b032e852d
Merge pull request #25874 from Avogar/fix-arrow-test
Fix typo in the test 00900_orc_arrow_parquet_maps
2021-07-01 12:25:31 +03:00
kssenii
4ad0f45f0e Some more tests 2021-07-01 08:35:28 +00:00
Vladimir
d0b28a7d6e
Merge pull request #25793 from Slach/improve_alter_partition_docs
add DELETE IN PARTITION and UPDATE IN PARTITION into ALTER syntax TOC
2021-07-01 10:55:44 +03:00
kssenii
f01c8edbff Fix access to tables after restart 2021-07-01 07:33:58 +00:00
alexey-milovidov
cae19ca36e
Merge pull request #25559 from MyroTk/tfs_bigdatatypes_fix
Testflows - Extended Precision Data Type Tests - Minor syntax update.
2021-07-01 02:59:19 +03:00
tavplubix
afbc6bf17d
Merge pull request #25684 from ClickHouse/cancel_merges_on_drop_partition
Cancel merges on DROP PARTITION
2021-06-30 23:41:04 +03:00
Maksim Kita
227913579d
Merge pull request #25872 from ClickHouse/add-arm-link
Add Linux ARM build to the front page
2021-06-30 23:11:57 +03:00
Alexey
46e6062c44 Fixed Syntax section of quantileExactLow 2021-06-30 19:42:41 +00:00
alesapin
c845a205f9 Merge branch 'better_remove_empty_parts' into fix_drop_part_in_queue 2021-06-30 22:42:02 +03:00
alesapin
0193a9d087 Fix locking 2021-06-30 22:41:25 +03:00
Alexey
b852253153 Fixed Wikipedia link 2021-06-30 19:37:52 +00:00
Alexey
8a3a142f75 Fixed links in quantiles.md 2021-06-30 19:28:57 +00:00
Alexey
414f48e1c0 Function added to quantiles.md 2021-06-30 19:23:46 +00:00
alesapin
45edc8c861 Fix tidy 2021-06-30 22:11:00 +03:00
Alexey
38e6c52a1c Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into alexey-sm-DOCSUP-9779-document-quantileBFloat16 2021-06-30 19:10:34 +00:00
Azat Khuzhin
626f47e044 Convert history file from readline format to replxx format
replxx requires each history line to prepended with time line:

    ### YYYY-MM-DD HH:MM:SS.SSS
    select 1

And w/o those service lines it will load all lines from history file as
one history line for suggestion. And if there are lots of lines in file it
will take lots of time (getline() + tons of reallocations).
2021-06-30 22:06:16 +03:00
Azat Khuzhin
fc46effe16 Fix race between DETACH and merges
CI reports failure of the 01442_merge_detach_attach test [1]:

<details>

    2021-06-21 02:25:43 01442_merge_detach_attach:                                              [ FAIL ] 122.37 sec. - result differs with reference:
    2021-06-21 02:25:43 --- /usr/share/clickhouse-test/queries/0_stateless/01442_merge_detach_attach.reference	2021-06-21 00:43:12.000000000 +0300
    2021-06-21 02:25:43 +++ /tmp/clickhouse-test/0_stateless/01442_merge_detach_attach.stdout	2021-06-21 02:25:43.211212197 +0300
    2021-06-21 02:25:43 @@ -0,0 +1 @@
    2021-06-21 02:25:43 +2

    2021.06.21 02:25:08.930896 [ 100543 ] {16eb4fe5-2d6b-4c81-a6be-c6a3b293edd3} <Debug> executeQuery: (from [::1]:36540, using production parser) (comment: '/usr/share/clickhouse-test/queries/0_stateless/01442_merge_detach_attach.sh') ALTER TABLE t DETACH PARTITION tuple()
    2021.06.21 02:25:08.931245 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> executeQuery: (from [::1]:36542, using production parser) (comment: '/usr/share/clickhouse-test/queries/0_stateless/01442_merge_detach_attach.sh') OPTIMIZE TABLE t FINAL
    2021.06.21 02:25:08.931826 [ 100543 ] {16eb4fe5-2d6b-4c81-a6be-c6a3b293edd3} <Trace> ContextAccess (default): Access granted: ALTER DELETE ON test_89nl0v.t
    2021.06.21 02:25:08.932159 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Trace> ContextAccess (default): Access granted: OPTIMIZE ON test_89nl0v.t
    2021.06.21 02:25:08.932889 [ 100543 ] {16eb4fe5-2d6b-4c81-a6be-c6a3b293edd3} <Information> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249): Detaching all_143_143_0
    2021.06.21 02:25:08.932921 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249) (MergerMutator): Selected 2 parts from all_143_143_0 to all_144_144_0
    2021.06.21 02:25:08.933530 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 4.60 TiB.
    2021.06.21 02:25:08.933705 [ 100543 ] {16eb4fe5-2d6b-4c81-a6be-c6a3b293edd3} <Information> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249): Detaching all_144_144_0
    2021.06.21 02:25:08.934215 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249) (MergerMutator): Merging 2 parts: from all_143_143_0 to all_144_144_0 into Compact
    2021.06.21 02:25:08.934280 [ 100543 ] {16eb4fe5-2d6b-4c81-a6be-c6a3b293edd3} <Information> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249): Detached 2 parts.
    2021.06.21 02:25:08.934948 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249) (MergerMutator): Selected MergeAlgorithm: Horizontal
    2021.06.21 02:25:08.936090 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> MergeTreeSequentialSource: Reading 2 marks from part all_143_143_0, total 1 rows starting from the beginning of the part, column x
    2021.06.21 02:25:08.937621 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> MergeTreeSequentialSource: Reading 2 marks from part all_144_144_0, total 1 rows starting from the beginning of the part, column x
    2021.06.21 02:25:08.938124 [ 100543 ] {16eb4fe5-2d6b-4c81-a6be-c6a3b293edd3} <Debug> MemoryTracker: Peak memory usage (for query): 0.00 B.
    2021.06.21 02:25:08.939928 [ 100543 ] {} <Debug> TCPHandler: Processed in 0.018537432 sec.
    2021.06.21 02:25:08.942140 [ 100543 ] {} <Debug> TCPHandler: Done processing connection.
    2021.06.21 02:25:08.948343 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249) (MergerMutator): Merge sorted 2 rows, containing 1 columns (1 merged, 0 gathered) in 0.014203821 sec., 140.80718139154246 rows/sec., 140.81 B/sec.
    2021.06.21 02:25:08.952021 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Trace> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249): Renaming temporary part tmp_merge_all_143_144_1 to all_143_144_1.
    2021.06.21 02:25:08.952869 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Warning> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249) (MergerMutator): Unexpected number of parts removed when adding all_143_144_1: 0 instead of 2
    2021.06.21 02:25:08.953264 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Trace> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249) (MergerMutator): Merged 2 parts: from all_143_143_0 to all_144_144_0
    2021.06.21 02:25:08.953913 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> MemoryTracker: Peak memory usage: 4.01 MiB.
    2021.06.21 02:25:08.958369 [ 100540 ] {bd4b710d-cd27-44ea-9dc9-e45d6ace0bd7} <Debug> MemoryTracker: Peak memory usage (for query): 4.01 MiB.
    ...
    2021.06.21 02:25:09.216075 [ 100543 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Debug> executeQuery: (from [::1]:36544, using production parser) (comment: '/usr/share/clickhouse-test/queries/0_stateless/01442_merge_detach_attach.sh') SELECT count() FROM t HAVING count() > 0
    2021.06.21 02:25:09.229491 [ 100543 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Trace> ContextAccess (default): Access granted: SELECT(x) ON test_89nl0v.t
    2021.06.21 02:25:09.232000 [ 100543 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
    2021.06.21 02:25:09.239907 [ 100543 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Debug> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249) (SelectExecutor): Key condition: unknown
    2021.06.21 02:25:09.240358 [ 100543 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Debug> test_89nl0v.t (efd364af-6721-4249-afd3-64af67214249) (SelectExecutor): Selected 1/1 parts by partition key, 1 parts by primary key, 1/1 marks by primary key, 1 marks to read from 1 ranges
    2021.06.21 02:25:09.241560 [ 100543 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Debug> MergeTreeSelectProcessor: Reading 1 ranges from part all_143_144_1, approx. 2 rows starting from 0
    2021.06.21 02:25:09.256053 [ 58403 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Trace> AggregatingTransform: Aggregating
    2021.06.21 02:25:09.256410 [ 58403 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Trace> Aggregator: Aggregation method: without_key
    2021.06.21 02:25:09.257576 [ 58403 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Debug> AggregatingTransform: Aggregated. 2 to 1 rows (from 2.00 B) in 0.013910412 sec. (143.777 rows/sec., 143.78 B/sec.)
    2021.06.21 02:25:09.257911 [ 58403 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Trace> Aggregator: Merging aggregated data
    2021.06.21 02:25:09.262595 [ 100543 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Information> executeQuery: Read 2 rows, 2.00 B in 0.045805192 sec., 43 rows/sec., 43.66 B/sec.
    2021.06.21 02:25:09.263337 [ 100543 ] {1699b404-b132-4b96-b04a-1c28cd062a79} <Debug> MemoryTracker: Peak memory usage (for query): 0.00 B.

</details>

  [1]: https://clickhouse-test-reports.s3.yandex.net/25513/b96df135aee40b1a54a4fc3f0d4db89e11385564/functional_stateless_tests_(memory).html#fail1

The problem here is that there is a tiny race window between DETACH
and OPTIMIZE.

DETACH cancel merges, and checks that there no merges for parts
currently under lock, and later changes the state of parts. After it
allows merges.

However OPTIMIZE get parts for processing under lock and only when it
starts writing temporary part it checks that merges are not canceled.

So suppose the following scenario:

      T#OPTIMIZE                       T#DETACH

                                       - cancel merges
                                           - lock
                                             - check that no merges are in progress
                                           - unlock
    - lock
      - get parts

          *<--Here, state of the parts are not changed yet,
              and lock is not held,
              so OPTIMIZE may (and will) get those parts. -->*

      - write temporary part
        - check merges not canceled
    - unlock
                                           - change the parts state
                                       - allows merges

Plus this patch will also fail merges earlier in case of concurrent
DETACH.

Refs: #13746
Refs: #23315
2021-06-30 21:13:31 +03:00
Azat Khuzhin
1b513556cf Mark 01442_merge_detach_attach as long 2021-06-30 21:12:18 +03:00
Azat Khuzhin
a471ebdabe Fix performance tests after converting ProfileEvents to Map type 2021-06-30 21:00:36 +03:00
Kseniia Sumarokova
360f772762
Merge pull request #25795 from sand6255/MySQL-column-comments-support
MySQL Engine column comments support
2021-06-30 20:18:47 +03:00
Kseniia Sumarokova
ed687f45a1
Merge branch 'master' into truncate 2021-06-30 20:08:42 +03:00
alesapin
89a401a84f Merge branch 'better_remove_empty_parts' into fix_drop_part_in_queue 2021-06-30 18:53:17 +03:00
alesapin
6a73c8b49e Review fixes 2021-06-30 18:24:51 +03:00
Pavel Kruglov
e7888bd707 Fix test 00900_orc_arrow_parquet_maps 2021-06-30 17:18:39 +03:00
Alexey Milovidov
77c1115f3e Add ARM build to the front page 2021-06-30 16:35:18 +03:00
Maksim Kita
011ed015fa
Merge pull request #25854 from kitaisreal/arm-fix-startup-crash
ARM fix startup crash
2021-06-30 16:18:59 +03:00
tavplubix
c958f876b8
Update MergeList.h 2021-06-30 15:55:26 +03:00
Alexey Milovidov
956b1f588d Fix typo, applied changes from @brijrajparmar27 2021-06-30 15:49:01 +03:00
alexey-milovidov
8c72e88bea
Update http.md 2021-06-30 15:45:43 +03:00
alexey-milovidov
2713499d9f
Update http.md 2021-06-30 15:45:21 +03:00
alexey-milovidov
6d321e1f74
Update http.md 2021-06-30 15:44:58 +03:00
alexey-milovidov
7366557bdf
Update http.md 2021-06-30 15:44:30 +03:00
alexey-milovidov
a83e4f7b3e
Merge pull request #25863 from Karneades/patch-1
Fix small typo in security changelog
2021-06-30 15:42:56 +03:00
alesapin
21f15be990 Merge branch 'better_remove_empty_parts' into fix_drop_part_in_queue 2021-06-30 15:30:32 +03:00
alesapin
2eb27540b2 Some test version 2021-06-30 15:29:09 +03:00
Vitaly Baranov
27bc0caf53
Merge pull request #25861 from vitlibar/correct-messages-in-integration-tests
Correct messages in integration tests.
2021-06-30 14:45:02 +03:00
Andreas Hunkeler
4501f4d86d
Fix small typo in security changelog 2021-06-30 13:31:08 +02:00