Commit Graph

106 Commits

Author SHA1 Message Date
Andrey Zvonov
2bfe8ad1d8 fix throw on non-existent user in remotequeryexecutor 2024-12-04 08:37:29 +00:00
Andrey Zvonov
86eb3d6425 Revive #42537
Co-authored-by: Enmk <V.Nemkov@gmail.com>

fix memory access
2024-11-19 09:53:27 +00:00
Konstantin Bogdanov
67c1e89d90
Apply linter changes 2024-10-06 12:29:20 +02:00
Igor Nikonov
a321dafd15 Remove debug logging 2024-09-27 13:24:28 +00:00
Igor Nikonov
b48a4e17db Fix 2024-09-25 08:05:40 +00:00
Igor Nikonov
a172029919 Send query to remote nodes earlier 2024-09-24 21:16:44 +00:00
Igor Nikonov
08ae6fae04 Debug remote query startup 2024-09-23 22:01:40 +00:00
Raúl Marín
f3df7bd171 Hide Settings implementation 2024-09-18 15:48:02 +02:00
Igor Nikonov
993dda2c6d Merge remote-tracking branch 'origin/master' into pr-all-connection-failed 2024-08-01 11:18:50 +00:00
Igor Nikonov
2cae0cb5ec force_connected flag for connection establisher 2024-07-29 20:29:15 +00:00
Igor Nikonov
465a34d3df Simplify, fix build 2024-07-19 20:27:57 +00:00
Igor Nikonov
53ea551014 Remove unused code 2024-07-19 11:30:55 +00:00
Igor Nikonov
8349d26095 Simplified implementation 2024-07-19 11:25:34 +00:00
Igor Nikonov
e806123856 Fix non x86 build 2024-07-18 20:30:56 +00:00
Igor Nikonov
523e0abb4e Remove debug logs 2024-07-17 13:15:14 +00:00
Igor Nikonov
b6a790124c Handling parallel replicas protocol with priority for async communication 2024-07-16 20:16:47 +00:00
Raúl Marín
1b75b8f4eb Merge remote-tracking branch 'blessed/master' into mergetree_private 2024-07-11 19:58:54 +02:00
Raúl Marín
9e599576ab Hide Settings object from Context.h 2024-07-11 14:00:05 +02:00
Igor Nikonov
beca3b9834 Proper placing for DistributedConnectionFailTry
+ better logs
2024-07-09 19:31:33 +00:00
Igor Nikonov
1e72335030 Failed to connect to replica log message 2024-07-09 17:53:34 +00:00
Antonio Andelic
1ef9bad76f Custom key support for cluster_for_parallel_replicas 2024-06-19 14:46:15 +02:00
Kruglov Pavel
39f091bffb
Merge pull request #59487 from azat/dist/fix-uncaught-exception
Fix possible uncaught exception during distributed query cancellation
2024-02-13 17:22:09 +01:00
Igor Nikonov
10082399d5 Minor review fixes 2024-02-07 00:52:25 +00:00
Igor Nikonov
dab078f7d2 Profile events 2024-02-05 20:21:48 +00:00
Igor Nikonov
45bcc04d98 Use ConnectionPoolPtr instead of raw pointer 2024-02-05 12:56:03 +00:00
Igor Nikonov
92a36109c3 Merge remote-tracking branch 'origin/master' into pr-better-replicas-failover-2 2024-02-05 12:07:44 +00:00
Igor Nikonov
ea2dad181d Fix non linux builds 2024-02-02 15:05:14 +00:00
Igor Nikonov
82d7b22144 Parallel replicas: better replicas failover 2024-02-01 21:06:29 +00:00
Azat Khuzhin
2b786f7c6d Wrap disconnect into try/catch in RemoteQueryExecutor dtor as well
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-01 20:56:31 +01:00
Azat Khuzhin
3108a988de Fix possible uncaught exception during distributed query cancellation
Cancellation of distributed queries may throw (i.e. some timeout), and
in case of pipeline had not been properly created properly
(EXCEPTION_BEFORE_START) cancel will not be sent, so cancellation will
be done from dtor and will throw.

<details>

<summary>stacktrace</summary>

```
<Fatal> BaseDaemon: (version 23.9.2.56 (official build), build id: 76109A79FA62B9BC630A6C39438DEA7D28147B68, git hash: a1bf3f1de5) (from thread 51895) Terminate called for uncaught exception:
<Fatal> BaseDaemon: Code: 209. DB::NetException: Timeout exceeded while reading from socket (socket (10.61.1.50:9000), receive timeout 20000 ms). (SOCKET_TIMEOUT), Stack trace (when copying this message, always include the lines below):
<Fatal> BaseDaemon:
<Fatal> BaseDaemon: 0. ./build_docker/./src/Common/Exception.cpp:98: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000c741d97 in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 1. ./build_docker/./contrib/llvm-project/libcxx/include/string:1499: DB::NetException::NetException<String const&>(int, String const&) @ 0x000000001148ace7 in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 2. ./build_docker/./src/QueryPipeline/RemoteQueryExecutorReadContext.cpp:101: DB::RemoteQueryExecutorReadContext::checkTimeout(bool) @ 0x000000001148a70a in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 3. ./build_docker/./src/Common/Fiber.h:42: DB::RemoteQueryExecutorReadContext::cancelBefore() @ 0x000000001148aded in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 4. ./build_docker/./src/Common/Fiber.h:27: DB::AsyncTaskExecutor::cancel() @ 0x000000001148969d in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 5. ./build_docker/./src/QueryPipeline/RemoteQueryExecutor.cpp:169: DB::RemoteQueryExecutor::~RemoteQueryExecutor() @ 0x000000001147a9d0 in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 6. ./build_docker/./contrib/llvm-project/libcxx/src/include/atomic_support.h:74: std::__shared_ptr_emplace<DB::RemoteSource, std::allocator<DB::RemoteSource>>::__on_zero_shared() @ 0x000000000c94a4a1 in /usr/lib/debug/usr/bin/clickhou

<Fatal> BaseDaemon: 7. ./build_docker/./contrib/llvm-project/libcxx/src/include/atomic_support.h:74: std::__shared_ptr_emplace<std::vector<std::shared_ptr<DB::IProcessor>, std::allocator<std::shared_ptr<DB::IProcessor>>>, std::allocator<std::vector<std::
or<std::shared_ptr<DB::IProcessor>>>>>::__on_zero_shared() @ 0x00000000114603a1 in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 8. ./build_docker/./contrib/llvm-project/libcxx/src/include/atomic_support.h:74: DB::QueryPipeline::~QueryPipeline() @ 0x000000001146347a in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 9. ./build_docker/./src/QueryPipeline/QueryPipeline.cpp:709: DB::QueryPipeline::reset() @ 0x0000000011468f78 in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 10. ./build_docker/./src/Interpreters/executeQuery.cpp:1427: DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::optional<DB::FormatSettings> const&, std::function<void (DB::IOutputFormat&)>) @ 0x000000001249aa8b in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 11. ./build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:818: DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThread::QueryScope>&) @ 0x00000000132bddb4 in /usr/lib/debug/usr/bin/clickhouse.debug
<Fatal> BaseDaemon: 12. ./build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:290: DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x00000000132c23a4 in /usr/lib/debug/usr/bin/clickhouse.debug
```

</details>

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-01 15:55:12 +01:00
Igor Nikonov
6624e34580 RemoteQueryExecutor constructors formatting 2024-01-30 13:06:47 +00:00
jsc0218
6f3124acdb
Merge pull request #58402 from zhangyifan27/add_max_estimated_execution_time
Seperate max_execution_time and max_estimated_execution_time
2024-01-21 19:57:06 -05:00
Igor Nikonov
131f71b50a
Revert "Revert flaky" 2024-01-19 13:51:30 +01:00
Raúl Marín
477489a05d Revert "Merge pull request #57235 from ClickHouse/pr-custom-key-failover"
This reverts commit 8ba9b4a7ef, reversing
changes made to 0f39245cb8.
2024-01-19 12:46:05 +00:00
zhangyifan27
7e56a2d925 fix test failure when allow_experimental_analyzer=1 2024-01-19 16:11:30 +08:00
Igor Nikonov
e9fc869254 Fix test flakiness with hedge connections enabled 2024-01-10 15:59:48 +00:00
Igor Nikonov
4fe54c213b Fix: round-robin load balancing for custom key queries
+ even subqueries distribution over available nodes for custom key query
+ creating load balancing instance for each custom key query separately
2023-12-27 15:06:41 +00:00
Igor Nikonov
0434044a7e
Merge pull request #57054 from ClickHouse/pr-cleanup-narrow-dependency
Parallel replicas: cleanup, narrow dependency
2023-11-23 20:12:37 +01:00
Igor Nikonov
ce98dfb251 Settings pointer to reference 2023-11-21 16:04:54 +00:00
Raúl Marín
47abb9e879 Fix race condition in RemoteSource 2023-11-21 14:07:14 +01:00
Igor Nikonov
16c1b64773 Merge remote-tracking branch 'origin/master' into pr-progress-bar 2023-10-20 08:12:28 +00:00
Igor Nikonov
01fa15c33f Less copying while handling annoucement 2023-10-18 12:20:14 +00:00
Igor Nikonov
0c8e49f519 Update total rows
+ calculate total rows based on rows in ranges to read
+ update progress after all ranges to read were announced
2023-10-12 20:34:26 +00:00
Igor Nikonov
9d95f4e1b6 Cleanup: parallel replica coordinator usage 2023-10-11 15:04:59 +00:00
Raúl Marín
e192d4c624
Fix summary reporting with parallel replicas with LIMIT (#53050) 2023-09-04 15:53:06 +02:00
Igor Nikonov
d7076ab017
Revert "Revert "Fix: respect skip_unavailable_shards with parallel replicas"" 2023-09-02 23:52:56 +02:00
Alexander Tokmakov
782c15330b Revert "Fix: respect skip_unavailable_shards with parallel replicas (#53904)"
This reverts commit f2290d9a6f.
2023-09-01 18:01:07 +02:00
Igor Nikonov
f2290d9a6f
Fix: respect skip_unavailable_shards with parallel replicas (#53904)
Co-authored-by: robot-clickhouse <robot-clickhouse@users.noreply.github.com>
2023-09-01 15:57:40 +02:00
Kruglov Pavel
59db219410
Fix possible error "Cannot drain connections: cancel first" 2023-07-25 19:21:41 +02:00
Nikita Mikhaylov
b8b0fd3abf
Slightly better code around packets for parallel replicas (#51451) 2023-06-28 12:30:15 +02:00