Commit Graph

16 Commits

Author SHA1 Message Date
Alexander Tokmakov
54001d3871
Revert "Fix uncaught DNS_ERROR on failed connection to replicas" 2022-09-13 13:51:09 +03:00
Robert Coelho
19097c433d
fix compile error 2022-09-01 01:34:41 -04:00
Robert Coelho
e0597700eb
Fix uncaught DNS_ERROR on failed connection to replicas
DNS_ERROR would cause the replica to not be marked as unusable, resulting in the replica being repeatedly reattempted on subsequent queries and for connection failover to break.
(This is common in Kubernetes setups where a replica has failed and it's DNS record is returning NXDOMAIN)

On SELECT, would additionally result in an intermittent query error if the failed replica is chosen:
"Code: 198. DB::Exception: Received from localhost:9000. DB::Exception: Not found address of host: chi-clickhouse-main-2-0: While executing Remote. (DNS_ERROR)"
2022-08-31 20:34:14 -04:00
avogar
04846a39a1 Better exception messages while socket timeouts 2022-04-29 09:04:24 +00:00
Maksim Kita
b1a956c5f1 clang-tidy check performance-move-const-arg fix 2022-03-02 18:15:27 +00:00
Azat Khuzhin
bedf208cbd Use fmt::runtime() for LOG_* for non constexpr
Here is oneliner:

    $ gg 'LOG_\(DEBUG\|TRACE\|INFO\|TEST\|WARNING\|ERROR\|FATAL\)([^,]*, [a-zA-Z]' -- :*.cpp :*.h | cut -d: -f1 | sort -u | xargs -r sed -E -i 's#(LOG_[A-Z]*)\(([^,]*), ([A-Za-z][^,)]*)#\1(\2, fmt::runtime(\3)#'

Note, that I tried to do this with coccinelle (tool for semantic
patchin), but it cannot parse C++:

    $ cat fmt.cocci
    @@
    expression log;
    expression var;
    @@

    -LOG_DEBUG(log, var)
    +LOG_DEBUG(log, fmt::runtime(var))

I've also tried to use some macros/templates magic to do this implicitly
in logger_useful.h, but I failed to do so, and apparently it is not
possible for now.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

v2: manual fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
Maksim Kita
0d0a14a925 Poco::Timespan reference fix 2021-04-29 19:11:20 +03:00
Pavel Kruglov
91f6f9227b Small fixes and tests updates 2021-02-26 18:55:58 +03:00
Pavel Kruglov
5628fd6da5 Small update 2021-02-24 02:22:07 +03:00
Pavel Kruglov
edee592cb0 Fix 2021-02-22 20:57:44 +03:00
Pavel Kruglov
1dbab60235 Fix 2021-02-22 10:52:19 +03:00
Pavel Kruglov
6d8eb44c01 Fix PSV and remove debug logging 2021-02-22 00:59:07 +03:00
Pavel Kruglov
4320782032 Style 2021-02-21 20:43:36 +03:00
Pavel Kruglov
dd5185c779 Refactor 4.0 2021-02-21 17:03:24 +03:00
Pavel Kruglov
2f5b4c20ae Fix 2021-02-18 14:21:48 +03:00
Pavel Kruglov
1b78de2142 Use fibers in HedgedRequests 2021-02-17 20:34:52 +03:00