Commit Graph

40 Commits

Author SHA1 Message Date
Anton Popov
5819bcd07a
Support asynchronous inserts for native protocol (#54730)
* support async insert for native protocol

* use separate queue for async inserts via native protocol

* fix test

* better logging for async inserts and more tests

* disable mixed internal and external data in async inserts

* fix tests

* fix quota in async inserts

* disable async insert for secondary query of distributed
2023-10-20 18:39:48 +02:00
Vitaly Baranov
76766a200e Fix access checking in evaluations of defaults during async insert. 2023-10-05 10:26:44 +02:00
Anton Popov
347f442f84 Merge remote-tracking branch 'upstream/master' into HEAD 2023-07-24 10:55:31 +00:00
Han Fei
b75c4ae2e5 Merge branch 'master' into hanfei/support-insert-token 2023-07-17 14:57:48 +02:00
Han Fei
7761e5ef9d support async_deduplicate_token for async insert 2023-07-15 14:42:08 +02:00
Nikita Taranov
c23e29d6aa don't account session's memory in thread/user mem tracker 2023-07-06 14:41:03 +02:00
Anton Popov
1eb939766b add test 2023-05-16 17:48:49 +00:00
Anton Popov
69ec65ab33 Merge remote-tracking branch 'upstream/master' into HEAD 2023-05-16 10:30:47 +00:00
Dmitry Novik
0c521eb10b Another atempt to fix test 2023-05-02 18:51:36 +00:00
Anton Popov
125e5c50b8 allow to flush async insert queue 2023-04-25 21:30:03 +00:00
Dmitry Novik
be40218a9a
Revert "Revert #46622 (test_async_insert_memory)" 2023-03-15 22:14:54 +01:00
Alexander Tokmakov
0359b3e336 Revert "Merge pull request #46622 from ClickHouse/async-insert-memory-fix"
This reverts commit 67469ad46b, reversing
changes made to 678e4250cd.
2023-03-11 17:01:10 +01:00
Anton Popov
955b54a6f8
Merge pull request #46753 from CurtizJ/fallback-from-async-insert
Fallback from async insert in case of large amount of data
2023-02-23 16:21:44 +01:00
Anton Popov
d5864fa88e allow to fallback from async insert in case of large amount of data 2023-02-22 21:59:24 +00:00
Dmitry Novik
8232966b9e Add a comment 2023-02-21 22:02:23 +00:00
Dmitry Novik
3c4c527bce Fix MemoryTracker counters for async inserts 2023-02-20 18:40:57 +00:00
Han Fei
ee5be80d9f Merge branch 'master' into hanfei/aysnc-insert 2022-11-25 17:27:56 +01:00
Anton Popov
c811f34a41
Simplify AsynchronousInsertQueue and fix race (#43233) 2022-11-25 15:02:22 +01:00
Han Fei
4eb97c77a0 introduce new settings "async_insert_max_query_number" 2022-11-24 16:31:16 +01:00
Anton Popov
190e1f6830
Merge branch 'master' into async-inserts-log 2022-10-06 01:59:27 +02:00
Anton Popov
148995894f add system table asynchronous_inserts_log 2022-10-03 21:35:55 +00:00
Nikita Mikhaylov
c993051265 Fix deadlock and flaky test 2022-09-26 15:17:34 +00:00
Nikita Mikhaylov
852d084950 Save 2022-09-26 10:24:39 +00:00
Nikita Mikhaylov
636cedf488 Better 2022-09-26 10:24:39 +00:00
Nikita Mikhaylov
9b35d54e8f First try 2022-09-26 10:24:39 +00:00
Azat Khuzhin
5cb37eb1a0 Terminate AsynchronousInsertQueue w/o waiting for timeout
Previously it simply sleeps for async_insert_busy_timeout_ms delay on
shutdown, which is not great, and produces false-positive hung checks on
CI [1].

  [1]: https://pastila.nl/?0087a100/db80915eac58e67eb05516bf459e5510

Refs: #29390 (cc @tavplubix, @CurtizJ)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-12 16:11:54 +02:00
Alexander Tokmakov
2c5a88faba deprecate Ordinary database 2022-06-23 10:20:14 +02:00
Azat Khuzhin
57f636a1e8 Fix race between INSERT async_insert=1 and system.asynchronous_inserts
CI report [1]:

    [c190f600f8c6] 2022.03.02 01:07:34.553012 [ 23552 ] {76b6113b-1479-46c9-90ab-e78a3c9f3dbb}  executeQuery: Code: 60. DB::Exception: Both table name and UUID are empty. (UNKNOWN_TABLE) (version 22.3.1.1) (from [::1]:42040) (comment: '02015_async_inserts_stress_long.sh') (in query: SELECT * FROM system.asynchronous_inserts FORMAT Null), Stack trace (when copying this message, always include the lines below):

    0. ClickHouse/contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string, std::__1::allocator > const&, int) @ 0xf50e04c in /fasttest-workspace/build/programs/clickhouse
    1. ClickHouse/src/Common/Exception.cpp:58: DB::Exception::Exception(std::__1::basic_string, std::__1::allocator > const&, int, bool) @ 0x663ebfa in /fasttest-workspace/build/programs/clickhouse
    2. DB::StorageID::assertNotEmpty() const @ 0xbc08591 in /fasttest-workspace/build/programs/clickhouse
    3. ClickHouse/contrib/libcxx/include/string:1444: DB::StorageID::getDatabaseName() const @ 0xe50d2b6 in /fasttest-workspace/build/programs/clickhouse
    4. ClickHouse/contrib/libcxx/include/string:1957: DB::StorageSystemAsynchronousInserts::fillData(std::__1::vector::mutable_ptr, std::__1::allocator::mutable_ptr > >&, std::__1::shared_ptr, DB::SelectQueryInfo const&) const @ 0xdac636c in /fasttest-workspace/build/programs/clickhouse

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/34973/e6fc6a22d5c018961c18247242dd3a40b8c54ff2/fast_test__actions_.html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-03-02 15:28:06 +03:00
alexey-milovidov
f6db7552b6
Merge pull request #29444 from CurtizJ/fix-deadlock-async-inserts
Fix deadlock in concurrent async inserts and truncates
2021-09-29 00:56:29 +03:00
Anton Popov
9a58e4a8ba fix deadlock in concurrent async inserts and truncates 2021-09-27 19:39:32 +03:00
Azat Khuzhin
c495297e65 Remove unused reset_timeout/access_timeout from AsynchronousInsertQueue 2021-09-27 10:02:27 +03:00
Anton Popov
f6191b98e7 Merge remote-tracking branch 'upstream/master' into HEAD 2021-09-15 17:47:22 +03:00
Anton Popov
8970dcdaf5 fix throwing exception for multiple clients in async inserts 2021-09-15 17:19:28 +03:00
Anton Popov
9646edf3dc fix possible race in AsynchronousInsertQueue 2021-09-15 02:54:10 +03:00
Anton Popov
29f327fa60 fix data race in async inserts 2021-09-10 13:24:09 +03:00
Anton Popov
8cb02a4b27 add some comments 2021-09-09 19:10:53 +03:00
Anton Popov
1f41f4541f change timeouts in async insert to milliseconds 2021-09-08 18:30:04 +03:00
Anton Popov
275118b0e8 fix data race in InsertQuery 2021-09-04 03:57:05 +03:00
Anton Popov
7d57aba4f9 add system table asynchronous_inserts 2021-09-03 19:46:09 +03:00
Anton Popov
7c42ce8370 improvements of async inserts 2021-09-02 02:18:09 +03:00