mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
e0d5020a92
- In general, it is expected that clickhouse-*-bridges and clickhouse-server were build from the same source version (e.g. are upgraded "atomically"). If that is not the case, we should at least be able to detect the mismatch and abort. - This commit adds a URL parameter "version", defined in a header shared by the server and bridges. The bridge returns an error in case of mismatch. - The version is *not* send and checked for "ping" requests (used for handshake), only for regular requests send after handshake. This is because the internally thrown server-side exception due to HTTP failure does not propagate the exact HTTP error (it only stores the error as text), and as a result, the server-side handshake code simply retries in case of error with exponential backoff and finally fails with a "timeout error". This is reasonable as pings typically fail due to time out. However, without a rework of HTTP exceptions, version mismatch during ping would also appear as "timeout" which is too misleading. The behavior may be changed later if needed. - Note that introducing a version parameter does not represent a protocol upgrade itself. Bridges older than the server will simply ignore the field. Only servers older than the bridges receive an error but such a situation should never occur in practice. |
||
---|---|---|
.. | ||
ExternalDictionaryLibraryBridgeHelper.cpp | ||
ExternalDictionaryLibraryBridgeHelper.h | ||
IBridgeHelper.cpp | ||
IBridgeHelper.h | ||
LibraryBridgeHelper.cpp | ||
LibraryBridgeHelper.h | ||
XDBCBridgeHelper.h |