Feed Operations Spec (Attempt #2)#4327
Open
analogrelay wants to merge 13 commits intoAzure:release/azure_data_cosmos-previewsfrom
Open
Feed Operations Spec (Attempt #2)#4327analogrelay wants to merge 13 commits intoAzure:release/azure_data_cosmos-previewsfrom
analogrelay wants to merge 13 commits intoAzure:release/azure_data_cosmos-previewsfrom
Conversation
Defines the design for feed operations (queries, read-many, change feed) in the driver crate, covering the Plan → Execute model, OperationPayload/OperationTarget refactors, continuation tokens, OpenTelemetry integration, and partition split handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Incorporates Java SDK comparison findings: O(1) continuation tokens using nested ResumeState tree, unified execute_operation API, simplified OperationPlan enum (Trivial/MultiStep), restored PartitionKey targeting, ORDER BY filter injection via placeholder, and renamed execute_operation_pipeline to execute_single_operation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replaces §8 with Turn/Step/Request diagnostics structure. The driver provides structured timing and concurrency data via raw timestamps; the SDK computes derived values and creates OTEL spans. Introduces TurnDiagnostics and StepDiagnostics with enqueued/started/completed timestamps for concurrency observation. Computed fields (wait time, execution time, max concurrent steps) are omitted to minimize memory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address findings from 9 parallel review agents: - Fix stale execute_operation_pipeline reference in §5.3 diagram - Consolidate resume strategy: §5.5 now summarizes and points to §7.3 - Add backend query plan caching as §2 open issue - Note EffectivePartitionKey needs Ord for EpkRange<EPK> (§3.2) - Clarify phasing: spec complete at ReadMany; cross-partition query details are forward-looking and not locked - Use Arc<CosmosOperation> in PlanStep::Fetch for fan-out sharing - Add wall_clock_start/start_instant to TurnDiagnostics for OTEL - Add StepOutcome enum to StepDiagnostics for non-HTTP step errors - Minor grammar and code fence fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The cached operation plan already subsumes the backend query plan, which the Planner consumes during planning and does not need afterward. No separate caching mechanism is needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new design spec describing how feed operations (starting with ReadAll; extensible to queries/ReadMany/change feed) should be integrated into azure_data_cosmos_driver via a unified Plan → Execute model, continuation tokens, and hierarchical diagnostics—so feed operations can use the driver’s existing pipeline (failover/retry/diagnostics/etc.).
Changes:
- Introduces a comprehensive feed-operations architecture spec (planner, plan graph model, executor).
- Specifies a versioned continuation token format (base64url JSON) and resume semantics resilient to splits/merges.
- Defines a hierarchical diagnostics shape (plan → node → request) and outlines how to preserve backward compatibility.
This was referenced May 4, 2026
2 tasks
acedcd5 to
3d32bbb
Compare
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.
After the branch for #4261 got unintentionally deleted from my fork, I had to open a new PR for this branch, even when I restored the branch. So that's this 🥴