ClickHouse / ClickHouse/clickhouse-java
BatchUpdateException during inserts with jdbc driver
- 主要言語
- Java
- スター
- 1.6k
- フォーク
- 636
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 29
説明
Hello. I have an issue with connection to Clickhouse with the driver (version 0.4.6).
The problems with Inserts. There is an exception:
`java.sql.BatchUpdateException: Unexpected end of file from server, server ClickHouseNode [uri=http://clickhouse.dwh.staging.com:8123/default]@-971229636
at com.clickhouse.jdbc.SqlExceptionUtils.batchUpdateError(SqlExceptionUtils.java:107)
at com.clickhouse.jdbc.internal.InputBasedPreparedStatement.executeAny(InputBasedPreparedStatement.java:154)
at com.clickhouse.jdbc.internal.AbstractPreparedStatement.executeLargeBatch(AbstractPreparedStatement.java:85)`
I've tried change some timeouts on ClickHouse side, I've tested with several versions of driver. Still have this kind of problems.
Inserts 10k-100k
ch version - 23.3.8
driver - 0.4.6
It's not a blocker for me, because with retries the data is inserted but have at least 10 exceptions per hour.
Could you please give me some advice?
コントリビューションガイド
調査の方向性
com.clickhouse.jdbc.SqlExceptionUtils、InputBasedPreparedStatement、AbstractPreparedStatement にあるスタックトレースの箇所から始め、driver 0.4.6 を使用して ClickHouse 23.3.8 に対する 10k–100k 行の挿入を再現します。完了条件は、予期しないファイル終端エラーの原因を特定し、リトライに頼らずに繰り返し発生する BatchUpdateException を防止できることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 28/100