Hi Xinqi, Thanks for the report, and for tracking it to the exact line.
The fix is open as apache/iotdb-client-go#171 -- it adds the assignment you identified, plus a regression test. I reproduced the failure independently, since the Grafana data source plugin you hit this through is downstream of the same client. Against apache/iotdb:2.0.10-standalone with the client at ee878e8, a table read spanning several fetches fails with 715 on the call after the last real row, and passes once that line is applied. That is one server version, and I do not know which one you were running, so treat it as exercising the path this PR fixes rather than as reproducing your deployment. One thing worth recording for anyone reviewing that PR: its new test genuinely discriminates. Run against the unfixed client both sub-cases fail with 715, and both pass once the assignment is applied. That is not automatic for a test of this shape -- had the stream ended with an empty final page, the old code would have taken the !hasResultSet branch and exited cleanly, leaving a green test over a live bug. On the plugin itself: connectors/grafana-plugin/go.mod pins iotdb-client-go/v2 v2.0.8, and v2.0.8 is the newest v2 release, so the plugin carries this bug until a fixed version is published. Once one ships I will open a PR in apache/iotdb-extras to move the plugin onto it. I would rather not guess at a date for the release, but the bump is on me and I will track it. Best regards, Zihan Dai GitHub: PDGGK On Fri, Aug 07, 2026 11:56 AM, Xinqi Zhao <[email protected]> wrote: > Hi all, > > I am integrating IoTDB table-model queries with Grafana through the Apache > IoTDB Grafana data source plugin. > > The plugin uses the Apache Go client: > > github.com/apache/iotdb-client-go/v2 v2.0.8 > > I encountered error 715 when a query returns multiple pages of results: > > error code: 715, message: Query is not found, it may be killed by others, > timeout or some other runtime errors > > Example query: > > SELECT time, instance, metric_value / 100 AS cpu_usage > FROM metric_samples > WHERE metric_name = 'process_cpu_load' > AND cluster = 'defaultCluster' > AND node_type = 'DATANODE' > > The default fetch size is 1024 rows. In one test, the query returned 4,323 > rows. The client successfully read all rows, but then issued one additional > fetch request and failed with error 715. > > The observed behavior was: > > First page: 1024 rows > Second page: 1024 rows > Third page: 1024 rows > Fourth page: 1024 rows > Final page: 227 rows > Then error 715 > > After inspecting the source code, I found that IoTDB's server-side > fetchResultsV2 implementation sets: > > hasResultSet = !result.isEmpty() > moreData = !finished > > Therefore, the final non-empty page can have: > > hasResultSet = true > moreData = false > > However, in the Go client's client/rpcdataset.go, the fetchResults > function updates the query result but does not update the local moreData > field from the server response. The client therefore continues to believe > that more data is available and sends another request using the same query > ID. The server has already completed and cleaned up the query, so it > returns QUERY_WAS_KILLED (715). > > The Java IoTDB client updates this state as follows: > > moreData = resp.moreData; > > I also tested a local copy of the Go client with the following line added: > > s.moreData = resp.GetMoreData() > > With this change, the same query completed successfully and returned all > 4,323 rows without error 715. > > The current main branch of the iotdb-client-go repository appears to > contain the same logic, and I could not find a newer v2 release after > v2.0.8. > > Best regards, > Xinqi Zhao
