Dead sessions are reused with auto-reconnect off; frame-too-large rejection desynchronizes the connection

オープン
#8 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

Session::is_open()、プールの取得側の追い出しループ、TFramedReadTransport、fetch_results、with_retry、execute_query_raw を追跡します。まずトランスポート障害の経路を再現または追跡し、その後、障害によってセッションが破損状態としてマークされ、プールがそれを追い出し、有効時には自動再接続がそれを置き換えることを検証します。その際、fetch_results にリトライ動作を追加しないでください。

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

説明

bug

Two related liveness/robustness issues:

  1. Session::is_open() is connection.is_some(), not socket state. With enable_auto_reconnect = false, a session whose connection died (silent peer, FIN lost, etc.) is reused indefinitely under load: the pool's acquire-side eviction loop (entry.session.is_open()) keeps handing it out, every RPC on it blocks or fails, and nothing ever discards it. A transport-level failure should mark the connection broken so is_open() turns false and the pool discards/replaces the session.
  2. Frame-too-large rejection desynchronizes the connection. TFramedReadTransport (thrift 0.23) rejects a frame above its default 16,384,000-byte cap before draining the body, leaving the connection desynchronized; fetch_results does not go through with_retry, so the desynchronized connection is then reused. Go and C# use the same cap, so the cap itself is not Rust-specific — the fix worth having is that a transport-level failure (including this one) marks the session broken, so the pool evicts it and auto-reconnect (when enabled) replaces it. (execute_query_raw deliberately excludes the result-set-pinned fetch_results from retry; see spec gotcha #13.)
主要言語
Rust
スター
1
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iotdb-client-rust のほかの issue

apache/iotdb-client-rust の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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