PDGGK commented on PR #114:
URL: https://github.com/apache/iotdb-extras/pull/114#issuecomment-5042738662
Both points addressed:
**1. USE state leak — fixed by making the database required.** `verifyQuery`
now rejects an empty database in table-model mode ("Input error, DATABASE is
required"), the editor marks the field required, and the README documents it.
Since every query now always runs `USE <database>` on its checked-out session
before executing, leftover session state can never influence a result
regardless of pool scheduling. Fully-qualified `db.table` references still work
and take precedence over the session database.
**2. Live smoke test** — ran the new mode end-to-end against a real IoTDB
2.0.8 (`apache/iotdb:2.0.8-standalone`, RPC 6667), driving `queryTableModel` —
the exact entry point Grafana calls — with real panel-range parameters over the
native RPC path (connect, session-open auth as root, per-query `USE`, timeout,
fetch):
- `SELECT time, device, temperature FROM env WHERE $__timeFilter(time)`
(database `smoke1`, 2 devices) → pivoted into 2 labeled series (`device=d1`,
`device=d2`), 2 points each
- the same query in `Table` format → 3 plain columns, 4 rows, server row
order preserved
- `WHERE time >= $__timeFrom() AND time <= $__timeTo()` → the ISO-8601
literal expansion parsed and filtered correctly on the live server
- all-types round trip: TIMESTAMP / TEXT / FLOAT / INT32 / INT64
(`9007199254740993`, above 2^53, exact) / BOOLEAN / DATE (`2025-07-14`) / BLOB
(`0xcafebabe`)
- **the point-1 scenario: 3 alternating rounds of `smoke1` (4 rows) /
`smoke2` (1 row, device `d9`) panels sharing one session pool — each panel saw
exactly its own database every round**
- a bad query → the server error surfaces as the panel error
One honest caveat: this drove the backend query path directly rather than a
rendered Grafana panel — the current `@grafana/toolkit` toolchain can't produce
a dev build on modern Node, which is the follow-up PR we agreed on. I'll post
an in-Grafana screenshot of the same dashboards as part of that
toolchain-migration PR, where the frontend becomes buildable again. The smoke
harness is a small build-tagged Go test; happy to include it in this PR if
you'd find it useful for CI or reproduction.
--
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]