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
- Ngôn ngữ chính
- Rust
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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`.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách xác định RedirectCache, SessionConfig, TableSessionPool và SessionPool::acquire_for_device, sau đó theo dõi cách acquire_for_device chọn các session đang rảnh và cách các redirect hint được so sánh. Kiểm tra các test pool và redirect hiện có, đồng thời xác minh mức độ hoàn tất đối với cả bốn hành vi được yêu cầu: matching đã chuẩn hóa, chọn hint mới nhất, các current default có thể cấu hình và API của table-pool.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- backend-api-design, databases
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100