ClickHouse / ClickHouse/clickhouse-java

[client-v2, jdbc-v2] Make execution TIMEOUT error optionally retriable

オープン
#3,072 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:general client-api-v2 jdbc-v2
主要言語
Java
スター
1.6k
フォーク
636
平均マージ
2日 23時間
マージ済み PR(30日)
29

説明

## Description

Current `159, TIMEOUT_EXCEEDED` is retried unconditionally. It should be a dedicated failure cause selectable per operation because different queries need different behavior:

| Query Type | Scenario | Retriable? | Recommended Action |
| :--- | :--- | :---: | :--- |
| **`SELECT`** | Pure read operations | **Yes** | Retry with exponential backoff or redirect to a replica node. |
| **`SELECT`** | Heavy unoptimized query hitting `max_execution_time` | **No** | Do not retry under identical settings. Increase `max_execution_time` or rewrite query. |
| **`INSERT`** | MergeTree tables with deduplication active (`insert_deduplicate = 1`) | **Yes** | Safe to retry using the exact same data block structure. |
| **`INSERT`** | Tables without block deduplication | **No** | **Unsafe.** Partial blocks may have been written; retrying risks duplicate rows. Check table state first. |
| **`DDL / Mutations`** | `ALTER`, `OPTIMIZE`, or background mutations | **No** | Inspect system tables (`system.mutations`, `system.merges`) before re-executing. |

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by tracing TIMEOUT_EXCEEDED handling in client-v2 and jdbc-v2, especially how the 159 failure is currently retried. Compare operation handling for SELECT, INSERT, and DDL or mutations, then determine where per-operation retry selection belongs. Done means timeout retry behavior can differ by operation and reflects the safety distinctions described in the table.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api, databases
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。