Konstantin Bogdanov
808b4a0213
Merge pull request #57628 from azat/config-nodes-override
...
Allow nodes in config with from_env/from_zk and non empty element with replace=1
2023-12-14 13:20:46 +03:00
Raúl Marín
efcacd3c34
Merge remote-tracking branch 'blessed/master' into backup_1
2023-12-14 11:08:50 +01:00
Robert Schulze
b36a93a25d
Revert "Remove arrayFold
"
...
This reverts commit 15dc0ed610
.
2023-12-14 09:52:29 +00:00
Azat Khuzhin
0e86e16a01
Revert "Replace --no-system-tables with loading virtual tables of system database lazily"
2023-12-14 09:07:47 +01:00
Alexey Milovidov
e4901323fd
Merge pull request #57836 from ClickHouse/remove-array-fold
...
Remove `arrayFold`
2023-12-14 07:15:29 +01:00
Alexey Milovidov
7a2edb4804
Merge pull request #57822 from azat/kafka-disable-stat
...
Disable system.kafka_consumers by default (due to possible live memory leak)
2023-12-14 04:37:50 +01:00
Alexey Milovidov
15dc0ed610
Remove arrayFold
2023-12-14 04:34:32 +01:00
Yakov Olkhovskiy
9e1d583f54
fix style
2023-12-13 23:36:54 +00:00
Kseniia Sumarokova
79db3c66df
Merge branch 'master' into allow-to-change-some-cache-settings-without-restart
2023-12-13 23:33:59 +01:00
Yakov Olkhovskiy
441050adce
fix style, cleanup
2023-12-13 22:26:38 +00:00
Anton Popov
82ebb5e2d1
Merge pull request #57790 from CurtizJ/fix-external-aggregation-with-projections
...
Fix result of external aggregation in case of partially materialized projection
2023-12-13 22:56:02 +01:00
Julia Kartseva
b8d274d070
Add malformed output generation to JSON fuzzer ( #57646 )
...
Randomly modify structural characters of a valid JSON ('{', '}', '[', ']',
':', '"', ',') to generate output that cannot be parsed as JSON.
Follow-up to https://github.com/ClickHouse/ClickHouse/pull/56490
2023-12-13 19:59:31 +01:00
Alexey Milovidov
e989eb7bd2
Merge pull request #57787 from kitaisreal/serialization-string-reduce-memory-usage
...
SerializationString reduce memory usage
2023-12-13 19:56:56 +01:00
Alexey Milovidov
bf4964b177
Merge pull request #57712 from ClickHouse/clickbench-ci
...
Add ClickBench to CI
2023-12-13 19:52:44 +01:00
Nikita Taranov
560e66f3ca
More respect to min_number_of_marks
in ParallelReplicasReadingCoordinator
( #57763 )
2023-12-13 19:51:49 +01:00
jsc0218
78773157b6
Merge pull request #57436 from ryanmjacobs/fix_issue_43186_pg_quote_array_ndims
...
Fix several issues regarding PostgreSQL `array_ndims` usage.
2023-12-13 13:41:43 -05:00
kssenii
38e38ef43f
Minor fix
2023-12-13 19:32:47 +01:00
Yakov Olkhovskiy
f4e2933f5d
use storage uuid instead of table name as a key in storage info because there are can be multiple dropped table with the same name
2023-12-13 18:08:41 +00:00
Azat Khuzhin
055c231438
Disable system.kafka_consumers by default (due to possible live memory leak)
...
It is not safe to use statistics because of how KafkaEngine works - it
pre-creates consumers, and this leads to the situation when this
statistics entries generated (RD_KAFKA_OP_STATS), but never consumed.
Which creates a live memory leak for a server with Kafka tables, but
without materialized view attached to it (and no SELECT).
Another problem is that this makes shutdown very slow, because of how
pending queue entries are handled in librdkafka, it uses
TAILQ_INSERT_SORTED, which is sorted insert into linked list, which
works incredibly slow (likely you will never wait till it ends and kill
the server)
For instance in my production setup the server was running for ~67 days
with such table, and it got 1'942'233 `TAILQ_INSERT_SORTED` entries
(which perfectly matches by the way - `67*86400/3` = 1'929'600), and it
moved only 289'806 entries for a few hours, though I'm not sure how much
time the process was in the running state, since most of the time it was
with debugger attached.
So for now let's disable it, to make this patch easy for backporting,
and I will think about long term fix - do not pre-create consumers in
Kafka engine.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-13 18:13:13 +01:00
Robert Schulze
d0a4443bbc
Consolidate substring() tests
2023-12-13 16:49:39 +00:00
Alexey Milovidov
54698cd2de
Merge pull request #55876 from ClickHouse/keeper-http-readiness-endpoint
...
Keeper HTTP readiness endpoint
2023-12-13 17:07:57 +01:00
Robert Schulze
bbd7d0c057
Merge pull request #57277 from slvrtrn/substr-with-enums
...
Add Enums support to `substring` function
2023-12-13 17:03:03 +01:00
Raúl Marín
d4522ee088
Merge pull request #57811 from Algunenano/revert_negative_positional_arguments
...
Revert #57741
2023-12-13 16:39:23 +01:00
Yakov Olkhovskiy
0ea4b16530
Merge branch 'master' into ft-dropped_tables_parts
2023-12-13 09:01:59 -05:00
Igor Nikonov
c165be76ab
Parallel replicas: friendly settings ( #57542 )
2023-12-13 14:42:06 +01:00
Raúl Marín
dd405a655e
Merge remote-tracking branch 'blessed/master' into backup_1
2023-12-13 13:39:58 +01:00
Raúl Marín
8c2137e0c6
Revert "Merge pull request #57741 from ucasfl/negtive-position"
...
This reverts commit 3d846800e0
, reversing
changes made to b31b4c932f
.
2023-12-13 13:09:36 +01:00
Vitaly Baranov
96bbff3af0
Merge pull request #57764 from vitlibar/fix-retries-for-disconnected-nodes-for-backup-on-cluster
...
Fix retries for disconnected nodes for BACKUP/RESTORE ON CLUSTER
2023-12-13 13:06:32 +01:00
Kseniia Sumarokova
b1325450e9
Merge pull request #57754 from ClickHouse/fix-loading-dependent-table-materialized-postgresql
...
Table engine MaterializedPostgreSQL fix dependency loading
2023-12-13 12:17:01 +01:00
robot-ch-test-poll1
c2f32f5994
Merge pull request #57795 from CurtizJ/fix-totals-maxMap
...
Fix merge in aggregation functions with `*Map` combinator
2023-12-13 10:31:15 +01:00
Yakov Olkhovskiy
5121bfcd78
major refactoring
2023-12-13 07:16:30 +00:00
Alexey Milovidov
62b6d1ef5e
iMerge branch 'master' of github.com:ClickHouse/ClickHouse into clickbench-ci
2023-12-13 01:41:27 +01:00
Alexey Milovidov
f11b90e7bb
Allow buckets without List access
2023-12-13 00:10:58 +01:00
Han Fei
6abe4b113a
Merge pull request #57375 from lingtaolf/feature/more_warnings
...
Feature/more warnings
2023-12-12 22:48:51 +01:00
Igor Nikonov
616d054dee
Merge remote-tracking branch 'origin/master' into pr-perf-improve-hope
2023-12-12 21:27:31 +00:00
Igor Nikonov
7f4a028196
Test and fix
2023-12-12 21:26:58 +00:00
Alexander Tokmakov
3482224f83
Merge branch 'master' into keeper-http-readiness-endpoint
2023-12-12 21:19:57 +01:00
Bhavna Jindal
1190abae22
multiple rows fix
2023-12-12 10:55:15 -08:00
Vitaly Baranov
028763def5
Simplify logic in BackupCoordinationStageSync::readCurrentState() and return earlier from the cycly on a connection problem.
2023-12-12 18:53:52 +01:00
Anton Popov
e4e97471a6
fix totals in aggregation functions with Map combinator
2023-12-12 17:31:56 +00:00
serxa
57d7a58dbe
Rename system.async_loader
into system.asynchronous_loader
2023-12-12 16:55:27 +00:00
Anton Popov
64d7abde09
fix result of external aggregation in case of partially materialized projection
2023-12-12 16:51:23 +00:00
Vitaly Baranov
7196103be5
Always recreate ephemeral "alive" node on reconnection.
2023-12-12 17:45:27 +01:00
Kruglov Pavel
6567fb2c08
Merge pull request #56859 from Avogar/csv-infer-numbers-from-strings
...
Allow to infer numbers from strings in CSV format
2023-12-12 17:09:02 +01:00
Kruglov Pavel
fd08c6f06a
Merge pull request #57751 from Avogar/better-json-inference-unnamed-tuples
...
Slightly better inference of unnamed tupes in JSON formats
2023-12-12 17:08:34 +01:00
kssenii
cc71b40002
Merge remote-tracking branch 'origin/master' into make-system-filesystem-cache-query-no-memory-intensive
2023-12-12 16:40:04 +01:00
Maksim Kita
7142eacad3
SerializationString reduce memory usage
2023-12-12 18:07:01 +03:00
Alexander Gololobov
09d6e6b945
Merge pull request #57743 from ClickHouse/other_timeout_for_wait
...
Increase async block cache deduplication timeout
2023-12-12 15:40:04 +01:00
Raúl Marín
049fb60c73
Fix error on retries due to TABLE_IS_READ_ONLY
2023-12-12 15:37:28 +01:00
Nikolai Kochetov
23ef8444d1
Merge pull request #57691 from ClickHouse/reset-agg-state-whenever-possible
...
Release memory for aggregation earlier.
2023-12-12 15:36:03 +01:00
Nikolai Kochetov
de4d414241
Merge pull request #57423 from ClickHouse/delay-totals-ports-as-well
...
Fix another case of non-ready set.
2023-12-12 15:34:34 +01:00
kssenii
fa0b2b9e50
Merge remote-tracking branch 'origin/master' into make-system-filesystem-cache-query-no-memory-intensive
2023-12-12 15:31:01 +01:00
Han Fei
a96593c8b1
Merge branch 'master' into feature/more_warnings
2023-12-12 15:25:01 +01:00
Natalya Chizhonkova
3d51192bad
Refactoring for UserDefinedSQLObjectsLoader
2023-12-12 17:03:49 +03:00
Kruglov Pavel
8a447bf57c
Merge pull request #55892 from Avogar/schema-inference-union
...
Add 'union' mode for schema inference
2023-12-12 15:02:06 +01:00
Nikolai Kochetov
be6f158612
Merge branch 'master' into delay-totals-ports-as-well
2023-12-12 14:00:55 +00:00
Kruglov Pavel
b33f124555
Merge pull request #57538 from MikhailBurdukov/ignore_on_cluster_for_grants
...
Ignore ON CLUSTER clause in grant/revoke queries for management of replicated access entities.
2023-12-12 14:59:58 +01:00
Nikolai Kochetov
696a2d9f4f
Merge pull request #57614 from ClickHouse/vdimir/join_array_lowcard_totals_crash
...
Fix type correction in HashJoin for nested low cardinality
2023-12-12 14:56:41 +01:00
Nikolai Kochetov
f1a330e95d
Add a comment
2023-12-12 13:46:29 +00:00
Kruglov Pavel
3d846800e0
Merge pull request #57741 from ucasfl/negtive-position
...
Support negative positional arguments
2023-12-12 14:16:10 +01:00
Robert Schulze
e6372d5528
Merge remote-tracking branch 'rschu1ze/master' into substr-with-enums
2023-12-12 12:59:30 +00:00
robot-ch-test-poll1
b31b4c932f
Merge pull request #57746 from vitlibar/kill-query-sleep
...
sleep() function now can be cancelled with KILL QUERY
2023-12-12 13:21:40 +01:00
Raúl Marín
923c3b7b32
Implement retries when ZK connection fails without committing the transaction
2023-12-12 12:00:46 +01:00
Konstantin Bogdanov
ea123ed5c1
Change response structure
2023-12-12 11:35:01 +01:00
Raúl Marín
9d8d5dfdf6
Partially revert "make stages commit"
...
This reverts commit e4becc01ba
.
2023-12-12 11:26:48 +01:00
Kseniia Sumarokova
91d36ad224
Merge pull request #57076 from ClickHouse/slru-for-filesystem-cache
...
Implement SLRU cache policy for filesystem cache
2023-12-12 10:20:58 +01:00
Robert Schulze
a4c306a85a
Merge pull request #57761 from rschu1ze/toStartOfInterval-refactoring
...
Minor refactoring of toStartOfInterval()
2023-12-12 09:49:50 +01:00
Konstantin Bogdanov
69a022f72a
Add observer
status
2023-12-12 09:42:32 +01:00
Konstantin Bogdanov
be9fac3a55
Lint includes
...
Co-authored-by: alesapin <alesapin@clickhouse.com>
2023-12-12 09:26:06 +01:00
Alexey Milovidov
0e548a4caf
Merge pull request #57707 from ClickHouse/ft-ip-bit-ops
...
Allow IPv6 to UInt128 conversion and binary arithmetic
2023-12-12 07:57:43 +01:00
Alexey Milovidov
40230579e6
Merge pull request #57766 from ClickHouse/fix-bug-window-functions
...
Fix bug window functions: revert #39631
2023-12-12 07:56:22 +01:00
Alexey Milovidov
9789c2caa2
Review fixes
2023-12-12 05:48:09 +01:00
flynn
02720cde01
Fix
2023-12-12 04:06:43 +00:00
Alexey Milovidov
3e52fcb6c0
Merge pull request #57717 from kitaisreal/serialization-string-improve-performance
...
SerializationString improve performance
2023-12-12 04:03:05 +01:00
Alexey Milovidov
6cab0124cd
Update SerializationString.cpp
2023-12-12 06:02:44 +03:00
Alexey Milovidov
22200566c8
Revert "Merge pull request #39631 from ClickHouse/parallel-window"
...
This reverts commit 33cc853d61
, reversing
changes made to b05a3d02ed
.
2023-12-12 03:45:00 +01:00
Vitaly Baranov
16afd81322
Fix retries for disconnected nodes for BACKUP/RESTORE ON CLUSTER.
2023-12-12 00:35:05 +01:00
Robert Schulze
bb4d9f7ae5
Refactor toStartOfInterval()
2023-12-11 21:50:31 +00:00
alesapin
7cdc3d29fb
Get rid of tiny function
2023-12-11 22:29:51 +01:00
alesapin
cbae29d26a
Merge pull request #57699 from hanfei1991/hanfei/keeper_soft_limit_ratio
...
support keeper memory soft limit ratio
2023-12-11 21:43:24 +01:00
kssenii
554ef59dcf
Better
2023-12-11 21:34:07 +01:00
alesapin
bfc2a7bb75
Update cache only after conflicts
2023-12-11 21:27:48 +01:00
alesapin
4b3e845dab
Merge branch 'master' into other_timeout_for_wait
2023-12-11 20:43:21 +01:00
Igor Nikonov
30dabd42d3
One lookup for 2 checks
...
(1) if it's the same part
(2) if annouced part has intersections with parts in working set
2023-12-11 19:37:42 +00:00
Ryan Jacobs
40da568ef9
Merge branch 'master' into fix_issue_43186_pg_quote_array_ndims
2023-12-11 11:17:38 -08:00
kssenii
05e56f76ed
Merge remote-tracking branch 'origin/master' into fix-loading-dependent-table-materialized-postgresql
2023-12-11 20:17:26 +01:00
kssenii
76be22e8e8
Fix build without libpqxx
2023-12-11 20:16:13 +01:00
Kseniia Sumarokova
907d0a79eb
Merge pull request #57568 from ClickHouse/fix-materialized-pg-issue-with-generated-columns
...
MaterializedPostgreSQL: Support "generated columns" and default values
2023-12-11 19:57:41 +01:00
vdimir
eaf2c34761
better lowcard handling in hash join
2023-12-11 18:35:38 +00:00
Kruglov Pavel
9dba7aa13d
Merge pull request #57364 from Avogar/better-json-fallback
...
Better JSON -> JSONEachRow fallback without catching exceptions
2023-12-11 19:03:50 +01:00
Kruglov Pavel
20510cde34
Merge pull request #57006 from Avogar/save-errors-better
...
Fix early stop while parsing file with skipping lots of errors
2023-12-11 19:03:14 +01:00
Kruglov Pavel
909b1fb36b
Merge pull request #57004 from Avogar/template-deadlock
...
Fix possible deadlock in Template format during sync after error
2023-12-11 19:02:40 +01:00
avogar
c3a76fcc08
Allow to infer numbers from strings in CSV format
2023-12-11 18:02:05 +00:00
Kruglov Pavel
3b1ffbd77c
Merge branch 'master' into schema-inference-union
2023-12-11 18:59:15 +01:00
Bhavna Jindal
df61040219
style-check
2023-12-11 09:22:44 -08:00
Bhavna Jindal
1ea8cb2a45
Added more testcases and spell check
2023-12-11 08:48:10 -08:00
kssenii
48ce040621
Fix
2023-12-11 17:30:23 +01:00
Raúl Marín
e1965bb6b5
WIP: Remove UNCERTAIN_COMMIT in INSERT
2023-12-11 17:27:56 +01:00
Vitaly Baranov
380e34226f
Fix compilation.
2023-12-11 16:57:18 +01:00
vdimir
ea09080c73
fix
2023-12-11 15:50:27 +00:00
Raúl Marín
e6be38be4d
Adapt from HEAD
2023-12-11 16:28:00 +01:00
Vitaly Baranov
ca262d6e10
Fix profile events.
2023-12-11 16:03:07 +01:00
avogar
a87a8e91cf
Slightly better inference of unnamed tupes in JSON formats
2023-12-11 14:46:12 +00:00
Vitaly Baranov
2c03348732
Use checkTimeLimit() to check if query is cancelled.
2023-12-11 15:33:16 +01:00
Raúl Marín
a55a0c068e
Merge remote-tracking branch 'blessed/master' into backup_1
2023-12-11 15:27:21 +01:00
Nikolai Kochetov
fcaa556bf7
Fixing test.
2023-12-11 13:39:10 +00:00
Raúl Marín
1b844e2116
Apply JOIN check to custom key parallel replicas too
2023-12-11 14:22:58 +01:00
Raúl Marín
6370a1b824
Merge remote-tracking branch 'blessed/master' into i48496
2023-12-11 14:22:54 +01:00
kssenii
e10d06af6f
Better
2023-12-11 14:07:28 +01:00
Igor Nikonov
4ccf4e11a8
Parallel replicas (perf): announcement response handling improvement
2023-12-11 13:00:08 +00:00
Maksim Kita
821c7d6527
Fixed tests
2023-12-11 15:48:52 +03:00
kssenii
1e4d61d55a
Change error code
2023-12-11 13:44:12 +01:00
Vitaly Baranov
ef8068ed03
Merge pull request #57733 from vitlibar/fix-rwlock
...
Fix RWLock inconsistency after write lock timeout (again)
2023-12-11 13:35:17 +01:00
vdimir
af45e138ad
fix
2023-12-11 12:33:11 +00:00
kssenii
b8caa00d24
Commit forgotten file
2023-12-11 13:28:36 +01:00
Nikolay Degterinsky
64cd83fcd9
Merge pull request #57713 from evillique/fix-unary-operators-parsing
...
Fix unary operators parsing
2023-12-11 13:18:00 +01:00
alesapin
a62a0b92de
Increase async block cache deduplication timeout
2023-12-11 12:46:22 +01:00
kssenii
966a09fb70
Review fixes
2023-12-11 12:42:23 +01:00
vdimir
cdfe99c380
Remove unused template parameter from fillColumnsFromMap
2023-12-11 11:34:54 +00:00
Robert Schulze
c141dd1330
Merge pull request #57549 from rschu1ze/format-arbitrary-types
...
Support arguments of arbitary type in function `format()`
2023-12-11 12:33:51 +01:00
Kruglov Pavel
6213593206
Merge pull request #57735 from bharatnc/ncb/functions-hashing-ssl-inline-doc
...
add inline documentation for ssl hashing functions
2023-12-11 12:27:10 +01:00
kssenii
d34a2782ff
Allow to decrease the number of download threads
2023-12-11 12:17:26 +01:00
flynn
c78649bdcf
Support negative positional arguments
2023-12-11 10:36:26 +00:00
Robert Schulze
9e434d43d7
Merge remote-tracking branch 'rschu1ze/master' into substr-with-enums
2023-12-11 10:21:08 +00:00
kssenii
a06179da00
Merge remote-tracking branch 'origin/master' into fix-materialized-pg-issue-with-generated-columns
2023-12-11 11:15:00 +01:00
kssenii
3652419873
Update run.sh
2023-12-11 11:01:13 +01:00
Maksim Kita
81250d1a90
SerializationString improve performance
2023-12-11 12:55:31 +03:00
vdimir
efb82a93c5
Merge pull request #57662 from ClickHouse/vdimir/analyzer_join_on_true_nullable
...
Analyzer: Fix JOIN ON true with join_use_nulls
2023-12-11 10:52:21 +01:00
Konstantin Bogdanov
7172a8ec9a
Remove redundant include
2023-12-11 10:20:43 +01:00
Konstantin Bogdanov
76966818ba
Fix FreeBSD build
2023-12-11 10:20:34 +01:00
Konstantin Bogdanov
771d5c58ea
Fix Keeper standalone build
2023-12-11 10:19:49 +01:00
Konstantin Bogdanov
89ba4a8452
Add HTTP readiness endpoint
2023-12-11 10:19:42 +01:00
MikhailBurdukov
119e451967
Merge branch 'master' into native_copy_for_s3_disks
2023-12-11 07:25:20 +00:00
Bharat Nallan Chakravarthy
e006454eb2
add inline docs for hash functions
2023-12-10 22:05:24 -08:00
Alexey Milovidov
e443567c0e
Merge pull request #52717 from azat/wait-threadpool
...
[RFC] Correctly wait background threads
2023-12-11 01:06:23 +01:00
Vitaly Baranov
952e58287a
Fix flaky test RWLockWriteLockTimeoutDuringTwoReads, add more comments.
2023-12-11 00:56:59 +01:00
Vitaly Baranov
73547e6d8a
Fixed condition and add more chasserts for consistency checks.
2023-12-11 00:56:51 +01:00
Vitaly Baranov
4aba3ec685
Add some comments.
2023-12-11 00:56:40 +01:00
Vitaly Baranov
f1ccf4e29f
Show owner query ids in the message for the DEADLOCK_AVOIDED error.
2023-12-11 00:56:17 +01:00
Vitaly Baranov
dc83e27164
Fix RWLock inconsistency after write lock timeout.
2023-12-11 00:56:06 +01:00
Vitaly Baranov
fc00569db6
Add more tests for RWLock.
2023-12-11 00:55:55 +01:00
Nikolay Degterinsky
ed23f47e72
Yet another fix
2023-12-10 23:04:29 +00:00
Alexey Milovidov
644ef7b63f
Revert "Fix RWLock inconsistency after write lock timeout"
2023-12-10 23:51:59 +03:00
Alexey Milovidov
0a20ce5d32
Merge pull request #55271 from azat/local-lazy-database
...
Replace --no-system-tables with loading virtual tables of system database lazily
2023-12-10 19:51:17 +01:00
Azat Khuzhin
450e8da7ce
Fix data race on vptr (ctor/dtor vs virtual call) in AsynchronousMetrics
...
TSan report [1]:
Exception: Sanitizer assert found for instance ==================
WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=1)
Write of size 8 at 0x7ffce68f5680 by main thread:
0 DB::AsynchronousMetrics::~AsynchronousMetrics() build_docker/./src/Common/AsynchronousMetrics.cpp:299:1 (clickhouse+0xf38fa6e) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
1 DB::ServerAsynchronousMetrics::~ServerAsynchronousMetrics() build_docker/./src/Interpreters/ServerAsynchronousMetrics.h:10:7 (clickhouse+0xf2b2f0f) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
2 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) build_docker/./programs/server/Server.cpp:1996:1 (clickhouse+0xf2b2f0f)
3 Poco::Util::Application::run() build_docker/./base/poco/Util/src/Application.cpp:315:8 (clickhouse+0x1d6c95fe) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
4 DB::Server::run() build_docker/./programs/server/Server.cpp:397:25 (clickhouse+0xf29e041) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
5 Poco::Util::ServerApplication::run(int, char**) build_docker/./base/poco/Util/src/ServerApplication.cpp:131:9 (clickhouse+0x1d6e9354) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
6 mainEntryClickHouseServer(int, char**) build_docker/./programs/server/Server.cpp:203:20 (clickhouse+0xf29b1a3) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
7 main build_docker/./programs/main.cpp:505:12 (clickhouse+0x72d7fa0) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
Previous read of size 8 at 0x7ffce68f5680 by thread T649:
0 DB::AsynchronousMetrics::update(std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l>>>) build_docker/./src/Common/AsynchronousMetrics.cpp:1559:5 (clickhouse+0xf38ebc5) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
1 DB::AsynchronousMetrics::run() build_docker/./src/Common/AsynchronousMetrics.cpp:354:13 (clickhouse+0xf390696) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
2 DB::AsynchronousMetrics::start()::$_0::operator()() const build_docker/./src/Common/AsynchronousMetrics.cpp:273:62 (clickhouse+0xf392eca) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
3 decltype(std::declval<DB::AsynchronousMetrics::start()::$_0&>()()) std::__1::__invoke[abi:v15000]<DB::AsynchronousMetrics::start()::$_0&>(DB::AsynchronousMetrics::start()::$_0&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23 (clickhouse+0xf392eca)
4 decltype(auto) std::__1::__apply_tuple_impl[abi:v15000]<DB::AsynchronousMetrics::start()::$_0&, std::__1::tuple<>&>(DB::AsynchronousMetrics::start()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/./contrib/llvm-project/libcxx/include/tuple:1789:1 (clickhouse+0xf392eca)
5 decltype(auto) std::__1::apply[abi:v15000]<DB::AsynchronousMetrics::start()::$_0&, std::__1::tuple<>&>(DB::AsynchronousMetrics::start()::$_0&, std::__1::tuple<>&) build_docker/./contrib/llvm-project/libcxx/include/tuple:1798:1 (clickhouse+0xf392eca)
6 ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::AsynchronousMetrics::start()::$_0>(DB::AsynchronousMetrics::start()::$_0&&)::'lambda'()::operator()() build_docker/./src/Common/ThreadPool.h:253:13 (clickhouse+0xf392eca)
7 decltype(std::declval<DB::AsynchronousMetrics::start()::$_0>()()) std::__1::__invoke[abi:v15000]<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::AsynchronousMetrics::start()::$_0>(DB::AsynchronousMetrics::start()::$_0&&)::'lambda'()&>(DB::AsynchronousMetrics::start()::$_0&&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23 (clickhouse+0xf392eca)
8 void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::AsynchronousMetrics::start()::$_0>(DB::AsynchronousMetrics::start()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::AsynchronousMetrics::start()::$_0>(DB::AsynchronousMetrics::start()::$_0&&)::'lambda'()&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:479:9 (clickhouse+0xf392eca)
9 std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::AsynchronousMetrics::start()::$_0>(DB::AsynchronousMetrics::start()::$_0&&)::'lambda'(), void ()>::operator()[abi:v15000]() build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:235:12 (clickhouse+0xf392eca)
10 void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::AsynchronousMetrics::start()::$_0>(DB::AsynchronousMetrics::start()::$_0&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:16 (clickhouse+0xf392eca)
11 std::__1::__function::__policy_func<void ()>::operator()[abi:v15000]() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:848:16 (clickhouse+0xf30682e) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
12 std::__1::function<void ()>::operator()() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:1187:12 (clickhouse+0xf30682e)
13 ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/./src/Common/ThreadPool.cpp:421:13 (clickhouse+0xf30682e)
14 void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/./src/Common/ThreadPool.cpp:183:73 (clickhouse+0xf30d3d1) (BuildId: d49dc55f80b62802f8721fdbcb07bdc88ac204a4)
15 decltype(std::declval<void>()()) std::__1::__invoke[abi:v15000]<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23 (clickhouse+0xf30d3d1)
16 void std::__1::__thread_execute[abi:v15000]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/./contrib/llvm-project/libcxx/include/thread:284:5 (clickhouse+0xf30d3d1)
17 void* std::__1::__thread_proxy[abi:v15000]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) build_docker/./contrib/llvm-project/libcxx/include/thread:295:5 (clickhouse+0xf30d3d1)
SUMMARY: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) build_docker/./src/Common/AsynchronousMetrics.cpp:299:1 in DB::AsynchronousMetrics::~AsynchronousMetrics()
And the problem is real, see [2].
[1]: https://s3.amazonaws.com/clickhouse-test-reports/52717/a6cf2297ef07ca0b065d944c9e30a3986285331d/integration_tests__tsan__[2_6]/integration_run_parallel0_0.log
[2]: https://github.com/google/sanitizers/wiki/ThreadSanitizerPopularDataRaces#data-race-on-vptr
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-10 18:32:40 +01:00
Alexey Milovidov
5a33fdcd4d
Merge pull request #57645 from bharatnc/ncb/sha512-256
...
add SHA512_256 function
2023-12-10 18:02:09 +01:00
Alexey Milovidov
e21c60191a
Merge pull request #57710 from azat/sparse-column-fix-aggregation
...
Fix SIGSEGV for aggregation of sparse columns with any() RESPECT NULL
2023-12-10 17:54:57 +01:00
Alexey Milovidov
d119052895
Merge pull request #51858 from ClickHouse/CurtizJ-fix-ttl-non-deterministic
...
Merging #37286
2023-12-10 17:50:36 +01:00
Nikolay Degterinsky
8b5c694684
Fix
2023-12-10 16:45:17 +00:00
Azat Khuzhin
2707e38c69
Fix dead-lock in DatabaseMaterializedPostgreSQL after interface changes
...
Deadlock for ATTACH:
/src/ch/clickhouse/src/Common/ThreadFuzzer.cpp:0::pthread_mutex_lock
/src/ch/clickhouse/contrib/llvm-project/libcxx/src/mutex.cpp:39::std::__1::mutex::lock()
/src/ch/clickhouse/src/Databases/DatabaseOrdinary.cpp:240::DB::DatabaseOrdinary::waitTableStarted(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const
/src/ch/clickhouse/src/Databases/DatabasesCommon.cpp:203::DB::DatabaseWithOwnTablesBase::tryGetTable(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context const>) const
/src/ch/clickhouse/src/Databases/PostgreSQL/DatabaseMaterializedPostgreSQL.cpp:335::DB::DatabaseMaterializedPostgreSQL::attachTableUnlocked(std::__1::shared_ptr<DB::Context const>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IStorage> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
/src/ch/clickhouse/contrib/llvm-project/libcxx/include/__mutex_base💯 :DB::IDatabase::attachTable(std::__1::shared_ptr<DB::Context const>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IStorage> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
/src/ch/clickhouse/contrib/llvm-project/libcxx/include/string:1499::DB::DatabaseMaterializedPostgreSQL::createTable(std::__1::shared_ptr<DB::Context const>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IStorage> const&, std::__1::shared_ptr<DB::IAST> const&)
/src/ch/clickhouse/contrib/llvm-project/libcxx/include/string:1499::DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::__1::unique_ptr<DB::DDLGuard, std::__1::default_delete<DB::DDLGuard>>&)
/src/ch/clickhouse/src/Interpreters/InterpreterCreateQuery.cpp:0::DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&)
/src/ch/clickhouse/src/Interpreters/InterpreterCreateQuery.cpp:1751::DB::InterpreterCreateQuery::execute()
/src/ch/clickhouse/src/Interpreters/executeQuery.cpp:0::DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*)
/src/ch/clickhouse/src/Interpreters/executeQuery.cpp:1287::DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum)
/src/ch/clickhouse/contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:612::DB::TCPHandler::runImpl()
/src/ch/clickhouse/src/Server/TCPHandler.cpp:2294::DB::TCPHandler::run()
/src/ch/clickhouse/base/poco/Net/src/TCPServerConnection.cpp:57::Poco::Net::TCPServerConnection::start()
/src/ch/clickhouse/contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:48::Poco::Net::TCPServerDispatcher::run()
/src/ch/clickhouse/base/poco/Foundation/src/ThreadPool.cpp:202::Poco::PooledThread::run()
/src/ch/clickhouse/base/poco/Foundation/include/Poco/SharedPtr.h:139::Poco::ThreadImpl::runnableEntry(void*)
CI: https://s3.amazonaws.com/clickhouse-test-reports/55271/ece8c86ebc02908e36786ca32d68f9ce0ddcb35d/integration_tests__tsan__[1_6].html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-10 16:06:18 +01:00