Merge pull request #26658 from azat/skip_unavailable_shards-excessive-attempts

Fix excessive connect attempts with skip_unavailable_shards
This commit is contained in:
alexey-milovidov 2021-07-22 02:12:32 +03:00 committed by GitHub
commit f9581893d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 8 deletions

View File

@ -38,11 +38,6 @@ void RemoteBlockInputStream::init()
query_executor.setLogger(log);
}
void RemoteBlockInputStream::readPrefix()
{
query_executor.sendQuery();
}
void RemoteBlockInputStream::cancel(bool kill)
{
if (kill)

View File

@ -52,9 +52,6 @@ public:
void setMainTable(StorageID main_table_) { query_executor.setMainTable(std::move(main_table_)); }
/// Sends query (initiates calculation) before read()
void readPrefix() override;
/// Prevent default progress notification because progress' callback is called by its own.
void progress(const Progress & /*value*/) override {}

View File

@ -0,0 +1 @@
Connection failed at try №1,

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL=trace
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
opts=(
"--connections_with_failover_max_tries=1"
"--skip_unavailable_shards=1"
)
$CLICKHOUSE_CLIENT --query "select * from remote('255.255.255.255', system.one)" "${opts[@]}" 2>&1 | grep -o 'Connection failed at try.*,'