Commit Graph

72617 Commits

Author SHA1 Message Date
Kevin Michel
aa3f4003c8
Fix hanging DDL queries on Replicated database
There was a race condition when issuing a DDL query on a replica just
after a new replica was added.

If the DDL query is issued after the new replica adds itself to the
list of replicas, but before the new replica has finished its
recovery, then the first replica adds the new replica to the list of
replicas to wait to confirm the query was replicated.

Meanwhile, the new replica is still in recovery and applies queries
from the /metadata snapshot. When it's done, it bumps its log_ptr
without marking the corresponding log entries (if any) as finished.

The first replica then waits until distributed_ddl_task_timeout
expires and wrongly assumes the query was not replicated.

The issue is fixed by remembering the max_log_ptr at the exact point
where the replica adds itself to the list of replicas, then mark as
finished all queries that happened between that max_log_ptr and the
max_log_ptr of the metadata snapshot used in recovery.

The bug was randomly observed during a downstream test. It can be
reproduced more easily by inserting a sleep of a few seconds at the
end of createReplicaNodesInZooKeeper, enough to have time to issue a
DDL query on the first replica.
2021-09-24 12:51:52 +02:00
tavplubix
81de25d37f
Merge pull request #29165 from ClickHouse/tavplubix-patch-3
Try print stacktraces if server does not respond to `select 1`
2021-09-19 14:05:04 +03:00
tavplubix
5fdd2b67ee
Update clickhouse-test 2021-09-19 01:05:17 +03:00
alexey-milovidov
20d8523a2e
Merge pull request #28888 from azat/mysql-in-fix
Fix queries to external databases (i.e. MySQL) with multiple columns in IN ( i.e. `(k,v) IN ((1, 2))` )
2021-09-18 15:53:40 +03:00
alexey-milovidov
e16e8fa286
Update ExpressionElementParsers.cpp 2021-09-18 15:47:57 +03:00
alexey-milovidov
c4b3add859
Update Query.cpp 2021-09-18 15:46:48 +03:00
alexey-milovidov
2a9c6fb9fc
Merge pull request #29153 from azat/test-2010_lc_native-fix
Increase timeout in 2010_lc_native
2021-09-18 15:43:46 +03:00
alexey-milovidov
3eed1f06ea
Merge pull request #28952 from fuzzERot/h3-functions
Implementation of h3ToGeoBoundary
2021-09-18 14:27:11 +03:00
robot-clickhouse
ae808b89d8 Update version_date.tsv after release 21.7.10.4 2021-09-18 11:46:19 +03:00
Azat Khuzhin
7f5f0e364d Increase timeout in 2010_lc_native
10 seconds it not enough [1]:

    2010_lc_native:                                                         [ FAIL ] 15.53 sec. - having stderror:
    Traceback (most recent call last):
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 302, in <module>
        main()
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 298, in main
        insertLowCardinalityRowWithIndexOverflow()
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 259, in insertLowCardinalityRowWithIndexOverflow
        readException(s)
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 185, in readException
        assert(readVarUInt(s) == 2)
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 65, in readVarUInt
        byte = readStrict(s)[0]
      File "/usr/share/clickhouse-test/queries/0_stateless/2010_lc_native.python", line 34, in readStrict
        cur = s.recv(size)
    socket.timeout: timed out

  [1]: https://clickhouse-test-reports.s3.yandex.net/29060/7f1160c466a968c680d1bc73e0ad5e9419d0b6d0/functional_stateless_tests_(debug).html#fail1

Server log:

    2021.09.17 21:02:53.734388 [ 682 ] {123456} <Trace> ContextAccess (default): Access granted: INSERT(x) ON test_0tmdh4.tab
    2021.09.17 21:03:04.835044 [ 682 ] {123456} <Error> executeQuery: Code: 117. DB::Exception: Index for LowCardinality is out of range. Dictionary size is 1, but found index with value 72057594037927936. (INCORRECT_DATA) (version 21.11.1.8109) (from [::ffff:127.0.0.1]:59512) (in query: insert into test_0tmdh4.tab format TSV settings input_format_defaults_for_omitted_fields=0), Stack trace (when copying this message, always include the lines below):

And according to trace_log the problem is slow unwind:

    2021-09-17 21:02:55.103893 libunwind::LocalAddressSpace::get32
    2021-09-17 21:02:56.151960 libunwind::LocalAddressSpace::get8
    2021-09-17 21:03:03.168447 libunwind::LocalAddressSpace::getULEB128
2021-09-18 10:53:02 +03:00
Ivan Blinkov
ba3f8f303d
[website] move js around (#29152)
* [website] move js around

* Update base.js
2021-09-18 10:49:15 +03:00
Ivan Blinkov
e18af442d4
[website] maybe fix deploy 2 2021-09-18 02:12:46 +03:00
robot-clickhouse
fa261ef19e Update version_date.tsv after release 21.8.6.15 2021-09-17 23:21:18 +03:00
robot-clickhouse
edfe566aee Update version_date.tsv after release 21.9.3.30 2021-09-17 23:16:52 +03:00
Ivan Blinkov
e3ee039c48
[website] maybe fix deploy 2021-09-17 20:41:19 +03:00
robot-clickhouse
c26bcf4ae1 Update version_date.tsv after release 21.3.17.2 2021-09-17 20:12:39 +03:00
alesapin
4adc4e9152
Merge pull request #28817 from ClickHouse/fix_part_checker
Fix rare replicas diverge
2021-09-17 18:06:27 +03:00
Vladimir Chebotarev
db516e8c91
Removed sub-optimal mutation notifications in StorageMergeTree when merges are still going (#27552)
* Removed redundand mutation notifications in `StorageMergeTree` when merges are still going.
2021-09-17 16:19:36 +03:00
Maksim Kita
14e4d49601
Merge pull request #29063 from ClickHouse/read-integer-overflow-bug-fix
Merging #27963
2021-09-17 16:06:58 +03:00
Vladimir C
333fd323f5
Merge pull request #29062 from Avogar/orc-fixes 2021-09-17 14:48:19 +03:00
Vladimir C
4eaf2969e2
Merge pull request #28332 from OodounaikingoO/master 2021-09-17 14:46:20 +03:00
Ivan Blinkov
d5e5dab9d5
Add GA 2021-09-17 14:35:16 +03:00
alesapin
46e5a37d12
Merge pull request #28845 from azat/ccache-fix
Fix ccache [4.0, 4.2) (RULE_LAUNCH_COMPILE/RULE_LAUNCH_LINK was incorrect)
2021-09-17 12:31:16 +03:00
Maksim Kita
73368aa351 Fixed tests 2021-09-17 12:17:19 +03:00
olgarev
2570e270d7
DOCSUP-13593: Alter view (#28911)
* Alter mv and lv (en)

* Translated to Russian. Fixes.

* Fixes

* Update docs/en/sql-reference/statements/alter/view.md

Co-authored-by: Ivan Blinkov <github@blinkov.ru>

Co-authored-by: Ivan Blinkov <github@blinkov.ru>
2021-09-17 12:07:32 +03:00
Maksim Kita
2fc2db35fe
Merge pull request #29112 from ClickHouse/blinkov-patch-22
[docs] try to fix build
2021-09-17 11:20:04 +03:00
alesapin
d0b5485773
Merge pull request #29071 from nicelulu/fix_deserializeCheckVersionTxn
Fix deserializeCheckVersionTxn version.
2021-09-17 10:40:02 +03:00
mergify[bot]
c23f1fc160
Merge branch 'master' into fix_part_checker 2021-09-17 07:23:12 +00:00
Ivan Blinkov
295541e43e
[docs] try to fix build 2021-09-17 09:38:00 +03:00
Nikita Mikhaylov
c52b8ec083
Introduced MergeTask and MutateTask (#25165)
Introduced MergeTask and MutateTask
2021-09-17 00:19:58 +03:00
Kseniia Sumarokova
e9d44d0848
Merge pull request #28797 from kssenii/rabbit-fix
Rewrite StorageRabbitMQ a little
2021-09-16 23:58:51 +03:00
mergify[bot]
2632c86009
Merge branch 'master' into ccache-fix 2021-09-16 18:53:24 +00:00
mergify[bot]
e0376e1e77
Merge branch 'master' into fix_deserializeCheckVersionTxn 2021-09-16 16:18:11 +00:00
alesapin
2d9fa85c0a
Merge pull request #28889 from azat/fix-mutation-wait
Fix waiting for mutation with mutations_sync=2
2021-09-16 19:10:56 +03:00
alesapin
606ab6d3e4 Typo fix 2021-09-16 18:40:25 +03:00
alesapin
8930a0d2bd More precise initialization 2021-09-16 18:39:11 +03:00
Anton Popov
77a995381b
Merge pull request #28975 from ClickHouse/check-what-if-do-not-add-const-agg-keys-with-having
Don not add const group by key for query with only having.
2021-09-16 18:33:53 +03:00
alesapin
b4cbc86164 Fix bug 2021-09-16 17:59:55 +03:00
Kruglov Pavel
50c0045e27
Remove unused header 2021-09-16 17:13:07 +03:00
kssenii
7b068317c1 Fix build 2021-09-16 13:55:18 +00:00
alexey-milovidov
63acdcc85e
Merge pull request #29067 from qianmoQ/translation-docs-zh
pr commercial
2021-09-16 16:25:41 +03:00
Kruglov Pavel
6b13f8b70a
Merge pull request #29073 from Avogar/fix-doc
Remove VerticalRaw format from docs
2021-09-16 15:20:22 +03:00
Pavel Kruglov
aa3bb2f2c0 Remove VerticalRaw format from docs 2021-09-16 14:30:28 +03:00
alexey-milovidov
12cf290258
Merge pull request #29070 from korzhenevski/patch-2
fix sql examples syntax highlight
2021-09-16 14:05:43 +03:00
kssenii
432ca1ed93 Fix tests 2021-09-16 10:46:43 +00:00
zhangxiao871
1faa98a48a Fix deserializeCheckVersionTxn version. 2021-09-16 18:34:13 +08:00
Yuriy Korzhenevskiy
52db6feff2
fix sql examples syntax highlight 2021-09-16 12:52:11 +03:00
Kruglov Pavel
1b0da15291
Use detachColumns
Co-authored-by: Vladimir C <vdimir@yandex-team.ru>
2021-09-16 12:22:39 +03:00
qianmoQ
35c1e38835 fix space between Chinese and English 2021-09-16 15:42:48 +08:00
qianmoQ
51925c68f8 fix space between Chinese and English 2021-09-16 14:29:40 +08:00