PDGGK opened a new pull request, #143: URL: https://github.com/apache/iotdb-extras/pull/143
Follow-up to https://github.com/apache/iotdb-extras/pull/134#discussion_r4229388662: the metadata lookups behind the table-model pickers share the 8-session pool with panel queries, could not be cancelled, ran again on every editor mount, and issued an extra `USE`. **Statements.** The table and column lookups now run `SHOW TABLES FROM "<db>"` and `DESC "<db>"."<table>"`, each part quoted on its own, so a lookup issues no `USE`. Panel and variable queries still `USE` their database. Checked on IoTDB 2.0.11: ``` SHOW TABLES FROM "grafana-Demo" -> weather-station DESC "grafana-Demo"."Weather-Station" -> time TIMESTAMP TIME / region STRING TAG / temperature FLOAT FIELD SHOW TABLES FROM grafana-Demo -> 700: mismatched input '-' ``` **Cancellation.** `TablePicker` gives each lookup an `AbortController` and aborts it when the picker unmounts or its database or table changes; the signal goes through `getResource(..., { abortSignal })` and reaches the handler as `r.Context()`. On the backend, `executeTableStatement` checks the context before taking a pooled session and again after. One limit: `TableSessionPool.GetSession()` in iotdb-client-go takes no context and waits up to 60 s, so a cancelled lookup still waits for a session, but it then hands the session straight back without running anything. Making the wait itself cancellable needs a context-aware `GetSession` in the Go client. With all 8 sessions held, a lookup cancelled at 0.3 s returned `context canceled` once a session was freed at 1.5 s, and all 8 sessions could be taken again afterwards. **Cache.** Successful lookups are reused for 30 s, keyed on the endpoint and the names; failures are not cached. Opening the DATABASE list still asks the server again, as before. The README notes the 30 s. Panel and variable queries go through the same executor, so they now also return the context error instead of running when their request has already been cancelled. Tests: Go 74 -> 79 top-level tests (122 -> 135 with subtests), Jest 38 -> 46, all passing; `tsc --noEmit` clean, no new ESLint findings. Removing the post-wait context check, the abort in the effect cleanup, the cache read, or the signal forwarding each makes the corresponding new test fail. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
