apache / apache/iotdb-client-rust

Redirect/pool: endpoint matching has no normalization, newest hint not preferred, cache TTL/entries not configurable, TableSessionPool lacks acquire_for_device

未關閉
#9 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
Rust
星號
1
分支
0
PR 合併指標
30 天內沒有已合併 PR

描述

Smaller redirect/pool issues around `acquire_for_device`:

1. **Redirect endpoint matching is exact host-string equality with no normalization**. Hostname-vs-IP spelling silently disables the optimization on multi-DataNode clusters, with no log line so it is invisible from outside. At minimum the comparison should normalize case/whitespace and resolve hostname-vs-IP where feasible.
2. **When idle sessions hold conflicting hints for one device, the winner is queue position, not recency.** `RedirectCache` already tracks `seq`/insertion order — prefer the newest hint (this stays within the documented "any idle session" behaviour).
3. **`RedirectCache` TTL and `max_entries` are fixed at construction** with no `SessionConfig` knob; this becomes measurable on large batch inserts. Add `SessionConfig` fields with the current defaults.
4. **`TableSessionPool` exposes `acquire()` but not `acquire_for_device()`**, so table-mode users accumulate hints no pool API can consume. Expose the underlying `SessionPool::acquire_for_device`.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

先定位 RedirectCache、SessionConfig、TableSessionPool 和 SessionPool::acquire_for_device,接著追蹤 acquire_for_device 如何選取閒置的 session,以及如何比較 redirect hint。檢查現有的 pool 和 redirect 測試,並根據以下四項要求的行為確認完成情況:正規化比對、選取最新的 hint、可設定的目前預設值,以及 table-pool API。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
rust
領域
backend-api-design, databases
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。