feat(query): Async query execution by returning early from long running queries#27
Merged
feat(query): Async query execution by returning early from long running queries#27
Conversation
Contributor
There was a problem hiding this comment.
Review
Issues
src/query.rs:136— The "poll again" hint inpoll()is missing thestatussubcommand. It printshotdata query <id>but the correct invocation ishotdata query status <id>. The correct hint is already used inexecute()at line 82. Following this bad hint would either fail to parse or attempt to run the query-run ID as SQL.
Action Required
Fix line 136: change "Poll again with: hotdata query {}" to "Poll again with: hotdata query status {}".
Contributor
There was a problem hiding this comment.
Review
Issues
P1 — src/query.rs:132–137: poll exits 0 when query is still running
The catch-all arm (statuses like "running" or "pending") prints to stderr and returns with exit code 0. This is indistinguishable from a successful result to any caller checking exit codes, making scripted polling impossible without parsing stderr output.
Fix: exit with a non-zero code (e.g. std::process::exit(2)) in the still-running arm so callers can loop on it reliably.
Action Required
Add a non-zero exit in the status => catch-all arm of poll before this can merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.