Commit Graph

43 Commits

Author SHA1 Message Date
Alexander Tokmakov
353b57f13f an optimiation for alters and replicated db 2023-06-15 20:20:11 +02:00
Azat Khuzhin
79b83c4fd2 Remove superfluous includes of logger_userful.h from headers
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-10 17:59:30 +02:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Nikita Mikhaylov
e897816572
Evict stale DNS entries from cache in case of network errors (#41707) 2022-09-25 14:06:13 +02:00
Arthur Passos
961365c7a4 Fix CaresPTRResolver not reading hosts file 2022-08-29 15:11:39 -03:00
Maksim Kita
191f39ae8d DNSResolver remove AI_V4MAPPED, AI_ALL hints 2022-08-22 21:03:25 +02:00
Arthur Passos
395dada988 minor style adjustments 2022-07-13 09:40:56 -03:00
Arthur Passos
d306c1b6f4 Use Strings alias instead of std::vec<std::string>> 2022-07-12 20:37:39 -03:00
Arthur Passos
d48690d455 Make CaresPTRResolver a singleton through DNSPTRResolverProvider, add comments and address minor comments 2022-07-12 14:21:10 -03:00
Arthur Passos
4f4acfabe5 c-ares draft wrapper and draft build rules 2022-07-08 17:52:14 -03:00
Arthur Passos
5c00dcd884 Link cpp-dns/udns unconditionally and update submodules to clickhouse fork 2022-07-04 10:07:03 -03:00
Arthur Passos
dcda1c5eb9 Fix style case and DNS error message 2022-07-04 10:06:27 -03:00
Arthur Passos
d66154e697 Test host_regexp against all PTR records instead of only one 2022-07-04 10:05:28 -03:00
Yakov Olkhovskiy
c8a4be4c64 refactoring 2022-05-17 08:31:31 -04:00
Yakov Olkhovskiy
fc26505111 multiple client connection attempts if hostname resolves to multiple addresses 2022-05-16 17:47:07 -04:00
Alexey Milovidov
242919eddd Remove abbreviation 2022-04-18 01:02:49 +02:00
Raúl Marín
060f5118f0 Improvements based on PR review 2022-04-06 10:48:12 +02:00
Raúl Marín
39cc3baf5f Keep the previous exception code 2022-04-05 16:37:53 +02:00
Raúl Marín
8a05cf3927 DNS cache: Add option to drop elements after several consecutive failures 2022-04-05 13:00:27 +02:00
avogar
75c56163a0 Refactor client fault tolerant connection 2022-02-10 12:43:08 +03:00
DF5HSE
c08bc7ad65 Merge branch 'master' of github.com:ClickHouse/ClickHouse into client-fault-tolerant-connection 2022-02-08 11:37:31 +03:00
DF5HSE
c1df291b18 Fix error with IPv6 in host param 2022-02-08 02:03:41 +03: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
Azat Khuzhin
baf14444e6 Cleanup ProfileEvents and CurrentMetrics 2021-11-10 21:15:27 +03:00
Alexey Milovidov
8b4a6a2416 Remove cruft 2021-10-28 02:10:39 +03:00
Mike Kot
38232c286d fixing paths 2021-10-02 21:45:05 +02:00
Mike Kot
65e6e211b4 Merge remote-tracking branch 'upstream/master' into improvement/fn-traits 2021-10-02 21:37:50 +02:00
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Mike Kot
7670ea50c1 Replacing std::function to Fn in some places
to avoid dynamic allocating while keeping desired function signature
clear.
Simplifying SimpleCache (CachedFn) using C++20
2021-09-29 13:09:39 +02:00
Anton Ivashkin
4dfd6ddcdb Catch Poco exception in resolveIPAddressImpl 2021-07-16 10:47:44 +03:00
Azat Khuzhin
0536db0ec3 Fix resolving of IPv6 addresses
v2: move the check from Cluster to DNSResolver
2021-05-21 22:47:35 +03:00
Alexey Milovidov
a530bad6ea Remove useless support for symbolic port names 2020-12-30 21:55:11 +03:00
Artem Zuikov
51ba12c2c3
Try speedup build (#14809) 2020-09-15 12:55:57 +03:00
Alexey Milovidov
edd89a8610 Fix half of typos 2020-08-08 03:47:03 +03:00
Alexander Tokmakov
c48ed67760 get hostname without mutex 2020-07-08 17:39:48 +03:00
tavplubix
103f0d3ead
Update DNSResolver.cpp 2020-06-07 18:17:23 +03:00
alexey-milovidov
f804321cba
Update DNSResolver.cpp 2020-06-07 03:18:54 +03:00
Alexander Tokmakov
f620d97f9f fix 2020-06-07 00:48:38 +03:00
Alexander Tokmakov
0cf8015f4a use DNSResolver to check if user is allowed to connect 2020-06-07 00:02:29 +03:00
Alexey Milovidov
25f941020b Remove namespace pollution 2020-05-31 00:57:37 +03:00
Alexey Milovidov
7e1813825b Return old names of macros 2020-05-24 01:24:01 +03:00
Alexey Milovidov
ee4ffbc332 find {base,src,programs} -name '*.h' -or -name '*.cpp' | xargs grep -l -P 'LOG_\w+\([^,]+, "[^"]+" << [^<]+\);' | xargs sed -i -r -e 's/(LOG_\w+)\(([^,]+), "([^"]+)" << ([^<]+)\);/\1_FORMATTED(\2, "\3{}", \4);/' 2020-05-23 19:47:56 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00