influxdata / influxdata/influxdb

Support `partial` parameter in the chunked `v1` /query API response

Open
#25,014 0 comments 0 reactions 0 assignees View on GitHub
v3
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

See https://github.com/influxdata/openapi/pull/651/files

When the v1 /query API returns a chunked response, we should be including a `partial` parameter in the series results to indicate that there are more records to be streamed.

_**Edit**_: This issue is a bit more challenging than it may appear. The current buffering/streaming logic in the `v1` query API code is not set up to emit such a parameter that is _aware_ of records that have not been streamed to the response yet. This is because it currently flushes everything that has been buffered, if possible, before polling the input `RecordBatchStream` for more `RecordBatch`es; in which case, the value of `partial` parameter may depend on record batches yet to be streamed.

Ultimately, to make this work, we likely need to change the underlying buffering/streaming logic.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the v1 /query API's chunked response path and its buffering/streaming logic, especially how it polls RecordBatchStream for RecordBatches. Review the linked openapi pull request for the expected partial parameter semantics. Done means streamed series results report whether more records remain, including records not yet emitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.