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

[client-v2] Incorrect read of server error when server response is compressed

Open chernser opened this issue 1 year ago • 2 comments

When compression is on (default case) and error happens - it is read from a raw stream, but should be wrapped with LZ4 Input Stream.

Steps to reproduce

  1. send query select asd123
  2. observe error with non-ascii symbols

Expected behavior

Error message should be a human readable string

Code example

Error log

Configuration

Environment

  • Client version:
  • Language version:
  • OS:

ClickHouse server

  • ClickHouse Server version:
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved:
  • Sample data for all these tables, use clickhouse-obfuscator if necessary

chernser avatar Sep 12 '24 05:09 chernser

@chernser
Didn't you already fixed this issue in #1830 ? Your description seems reproducible before this PR, and not after it.

Am-phi avatar Oct 19 '24 10:10 Am-phi

Good day, @Am-phi! yes, #1830 fixes most of the problems and I left issue open to test more and fix may be edge cases. There is a tricky case when error is within data stream in the format of the data stream. It is fixed too, but I would spend sometime for additional tests.

chernser avatar Oct 21 '24 16:10 chernser