- lots of static_cast
- add safe_cast
- types adjustments
- config
- IStorage::read/watch
- ...
- some TODO's (to convert types in future)
P.S. That was quite a journey...
v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
In case of possible EINTR (i.e. query profiler) it is possible for
select() from getReplicaForReading() (this is the stage when the
initiator is waiting for Cancel packet from the remote shards, that can
be sent in case of enough rows was read, or the query had been cancelled
explicitly) to return without any sockets ready, and
getReplicaForReading() will assume that the timeout happened.
Here is a stacktrace example:
[ 59205 ] {04f3d3a4-7346-4ef2-bf57-928f9e55ed89} <Error> TCPHandler: Code: 159. DB::Exception: Received from b8:9000. DB::Exception: Timeout (-1000 ms) exceeded while reading from . Stack trace:
0. Poco::Exception::Exception() @ 0x17e26eac in /usr/bin/clickhouse
1. DB::Exception::Exception() @ 0xb550b9a in /usr/bin/clickhouse
2. DB::Exception::Exception<>() @ 0x15ad1c81 in /usr/bin/clickhouse
3. DB::MultiplexedConnections::getReplicaForReading(bool) @ 0x15ad16fc in /usr/bin/clickhouse
4. DB::MultiplexedConnections::receivePacketUnlocked() @ 0x15ad02fd in /usr/bin/clickhouse
5. DB::MultiplexedConnections::drain() @ 0x15ad0df8 in /usr/bin/clickhouse
6. DB::ConnectionCollector::drainConnections(DB::IConnections&, bool) @ 0x1443c205 in /usr/bin/clickhouse
7. DB::RemoteQueryExecutor::finish() @ 0x1445ea6a in /usr/bin/clickhouse
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Previously before the exception there is a loop for disconnecting, so
dumpAddress* will not return anything, fix this, by saving the
addresses before.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This makes the target location consistent with other auto-generated
files like config_formats.h, config_core.h, and config_functions.h and
simplifies the build of clickhouse_common.
This makes the target location consistent with other auto-generated
files like config_formats.h, config_core.h, and config_functions.h and
simplifies the build of clickhouse_common.