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

Offen
#9 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Rust
Sterne
1
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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`.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne damit, RedirectCache, SessionConfig, TableSessionPool und SessionPool::acquire_for_device zu lokalisieren, und verfolge dann, wie acquire_for_device inaktive Sessions auswählt und wie Redirect-Hinweise verglichen werden. Prüfe die vorhandenen Pool- und Redirect-Tests und verifiziere die Vollständigkeit anhand aller vier angeforderten Verhaltensweisen: normalisiertes Matching, Auswahl des neuesten Hinweises, konfigurierbare aktuelle Defaults und die API des Tabellenpools.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend-api-design, databases
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.