-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC: support paging with streaming queries #96
base: main
Are you sure you want to change the base?
Conversation
rawQuery: first.meta?.executedQueryString, | ||
nextToken: meta.nextToken, | ||
} as TimestreamQuery; | ||
// return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is commented out so we avoid frontend paging in addition to backend paging
|
||
func (q *openQuery) doStream(ctx context.Context, sender *backend.StreamSender) error { | ||
backend.Logger.Info("Starting stream for", "queryId", q.queryId, "token", q.query.NextToken) | ||
timer := time.NewTimer(time.Second * 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what interval makes the most sense -- since the query will block, something short seems reasonable
🤔 hymm -- thinking more about this... I don't think this solves our HA issue, since the initial query may be on a different node than when the client returns to get the streaming updates |
|
We currently support paging by having the client submit additional requests over HTTP when a
nextToken
exists -- this PR explores how we could service the requests with a continuous stream from the backend. This uses the new live features in grafana 8TODO?