clickhouse-bulk icon indicating copy to clipboard operation
clickhouse-bulk copied to clipboard

Handle octet-stream for passthru and credentials in Reqest X-Headers

Open igorvoltaic opened this issue 1 year ago • 0 comments

  • Move config to global variable to let access it from any app scope
  • Use stream to handle bytes properly jdbc driver fails to connect Clickhouse without this feature. To reproduce this bug try to connect Click via Bulk with DBreaver
  • Handle creds in X-ClickHouse-* headers (borrowed this part from chproxy)

Issues left with these changes (and before them):

  • if any part got dumped and service restated and do not receive any requests after the restart there is no way to resume dumped inserts, since service won't have creds stored. An options is to provide creds thru env var.
  • RowBinary inserts from dump fail at at some point due to string conversions while being parsed which leads to response: Code: 33. DB::Exception: Cannot read all data. Bytes read: 423943. Bytes expected: 12213357.: (at row 215)

igorvoltaic avatar Jul 19 '23 21:07 igorvoltaic