clickhouse-java
clickhouse-java copied to clipboard
Insert in RowBinaryWithDefaults format doesn't work when async_insert and wait_for_async_insert are enabled
Describe the bug
Steps to reproduce
- The easiest way to reproduce is to add
.set("async_insert", "1")
.set("wait_for_async_insert", "1")
to https://github.com/ClickHouse/clickhouse-java/blob/9e1772edf3a05fbb8e80659ee8664c68ed42e978/clickhouse-client/src/test/java/com/clickhouse/client/ClientIntegrationTest.java#L2523
Expected behaviour
Tested only for http protocol, so if clickhouse returns status_code == 200 then INSERT is successful or failed if not.
Error log
Caused by: com.clickhouse.client.ClickHouseException: Code: 399. DB::Exception: Format RowBinaryWithDefaults is not suitable for output. (FORMAT_IS_NOT_SUITABLE_FOR_OUTPUT) (version 24.2.2.71 (official build))
, server ClickHouseNode [uri=https://*******/****, options={sslmode=STRICT}]@879600952
at com.clickhouse.client.ClickHouseException.of(ClickHouseException.java:168)
at com.clickhouse.client.AbstractClient.lambda$execute$0(AbstractClient.java:275)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 3 more
Caused by: java.io.IOException: Code: 399. DB::Exception: Format RowBinaryWithDefaults is not suitable for output. (FORMAT_IS_NOT_SUITABLE_FOR_OUTPUT) (version 24.2.2.71 (official build))
at com.clickhouse.client.http.ApacheHttpConnectionImpl.checkResponse(ApacheHttpConnectionImpl.java:209)
at com.clickhouse.client.http.ApacheHttpConnectionImpl.post(ApacheHttpConnectionImpl.java:243)
at com.clickhouse.client.http.ClickHouseHttpClient.send(ClickHouseHttpClient.java:118)
at com.clickhouse.client.AbstractClient.sendAsync(AbstractClient.java:161)
at com.clickhouse.client.AbstractClient.lambda$execute$0(AbstractClient.java:273)
... 4 more
Hi @ne1r0n Looking into it
Are you testing against cloud or local version
@mzitnik thank you, just wanted to add that initially I met this issue using https://github.com/ClickHouse/clickhouse-kafka-connect, @Paultagoras FYI.
Tested on local clickhouse version 24.2.2.71 and 24.3.1.2672
Thanks for letting us know!
Ok, we have found the problem in ClickHouse https://github.com/ClickHouse/ClickHouse/issues/62644
Any updates on this issue?
In our application, the client (v0.6.5
) has the same 399 error but the insert seems to succeed anyways.
Good day, @davimi! There is a CH issue https://github.com/ClickHouse/ClickHouse/issues/62644