Repository navigation
Conversation
…outing Design doc for the async-query REST wiring on top of the QueryJobService landed in opensearch-project#5818. Answers three specific questions: 1. How does routing between the existing Spark path and the new QueryJobService path work? What new transport actions are needed? -> None. Routing lives inside AsyncQueryExecutorService via a new RoutingAsyncQueryExecutorService that inspects the queryId. Zero new REST endpoints, zero new ActionTypes. 2. How do we switch between sync and async without adding a request-body parameter? -> URL parameter wait_for_completion_timeout (Elasticsearch async- search / BigQuery pattern). Absent = wait forever = current sync behavior. 0 = pure async. Positive = hybrid. 3. What is a terminal state? -> SUCCEEDED, FAILED, CANCELLED. State does not change after entering one; completedAtMillis, result, and failure invariants are enforced by the record. Retention is orthogonal — modelled as a service-layer RetentionPolicy, not a state. Design-only; no code changes. Signed-off-by: Peng Huo <[email protected]>
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.
Design doc for the follow-up PR after opensearch-project#5818 (the neutral
QueryJobServicelifecycle).Answers three questions raised in review:
How does routing work? Details in §4.1 and sequence diagrams §7.5–§7.6. No new REST endpoints, no new transport
ActionTypes. The router is a single new class (RoutingAsyncQueryExecutorService) that sits behind the existingAsyncQueryExecutorServiceinterface and dispatches on the id shape.TransportGetAsyncQueryResultActionandTransportCancelAsyncQueryRequestActionare unchanged.How to switch sync/async without a body parameter? §4.2 — URL parameter
wait_for_completion_timeout(Elasticsearch async-search / BigQuery pattern). Sync behavior stays the default for old clients that don't send the parameter.?async=trueis not needed as a separate flag — it's equivalent to?wait_for_completion_timeout=0.What is a terminal state? §4.3 + §5. SUCCEEDED / FAILED / CANCELLED. Retention is orthogonal (a service-layer
RetentionPolicy, not part of state).Doc:
docs/dev/async-query-lifecycle-design.md.Design-only; no code changes. Awaiting sign-off on §10 open questions before implementation.