ClickHouse/src/BridgeHelper
Robert Schulze e0d5020a92
Add simple versioning to the *-bridge-to-server protocol
- 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.
2022-08-08 19:40:37 +00:00
..
ExternalDictionaryLibraryBridgeHelper.cpp Add simple versioning to the *-bridge-to-server protocol 2022-08-08 19:40:37 +00:00
ExternalDictionaryLibraryBridgeHelper.h Factorize generic code from ExternalDictLibBridgeHelper into base class 2022-08-08 17:16:46 +00:00
IBridgeHelper.cpp Prepare server-side BridgeHelper for catboost integration 2022-08-04 19:29:51 +00:00
IBridgeHelper.h Prepare server-side BridgeHelper for catboost integration 2022-08-04 19:29:51 +00:00
LibraryBridgeHelper.cpp Factorize generic code from ExternalDictLibBridgeHelper into base class 2022-08-08 17:16:46 +00:00
LibraryBridgeHelper.h Add simple versioning to the *-bridge-to-server protocol 2022-08-08 19:40:37 +00:00
XDBCBridgeHelper.h Add simple versioning to the *-bridge-to-server protocol 2022-08-08 19:40:37 +00:00