@@ -54,6 +54,27 @@ traffic flip across the whole pipeline.
5454- There is no dedicated scale endpoint. Scale-only changes use the same ` PUT `
5555 endpoint as topology changes.
5656
57+ ## Consistency Model
58+
59+ The current API serializes live operations per logical pipeline, identified by
60+ ` (pipeline_group_id, pipeline_id) ` . A rollout or shutdown conflicts with another
61+ active operation for the same logical pipeline, while operations for different
62+ logical pipelines may run concurrently.
63+
64+ Rollout planning validates a candidate by patching one pipeline into the
65+ controller's current in-memory ` OtelDataflowSpec ` snapshot and running full
66+ engine validation on that candidate snapshot. That validation does not make the
67+ operation a whole-config transaction: another logical pipeline can commit before
68+ this rollout commits, and commit applies only the accepted pipeline back into
69+ the latest live config.
70+
71+ The API intentionally leaves room to widen the consistency scope later. If
72+ group-level invariants become mutable, the controller can serialize
73+ config-mutating operations per pipeline group and return ` 409 Conflict ` for
74+ concurrent operations in that group without changing the existing pipeline
75+ endpoint or response schema. Engine-level reconfiguration can be added as a
76+ separate operation surface if full-engine transactions become necessary.
77+
5778## How It Works
5879
59801 . The client submits a candidate pipeline config to
@@ -169,8 +190,10 @@ Status codes:
169190- ` 202 Accepted ` : request accepted and ` wait=false `
170191- ` 200 OK ` : ` wait=true ` and the rollout finished successfully
171192- ` 404 Not Found ` : pipeline group does not exist
172- - ` 409 Conflict ` : another rollout or shutdown is already active for the same
173- logical pipeline, or a waited rollout finished in failure
193+ - ` 409 Conflict ` : another incompatible live operation is active in the
194+ controller's current consistency scope, or a waited rollout finished in
195+ failure. In the current version of the API, that scope is one logical
196+ pipeline.
174197- ` 422 Unprocessable Entity ` : validation failure or unsupported runtime
175198 mutation
176199- ` 504 Gateway Timeout ` : ` wait=true ` exceeded the overall wait timeout
@@ -207,7 +230,7 @@ overlapping old/new generations stay distinguishable during a rolling cutover.
207230- ` POST /groups/shutdown `
208231
209232These are separate from reconfiguration, but they use the same resident
210- controller and the same logical-pipeline locking rules .
233+ controller and the same live-operation consistency scope .
211234Terminal shutdown ids are retained only within a bounded in-memory window, so
212235older ids may return ` 404 Not Found ` after eviction.
213236
@@ -356,9 +379,12 @@ pattern.
356379
357380## Operational Notes
358381
359- - Different logical pipelines may roll concurrently.
382+ - Different logical pipelines may roll concurrently in the current
383+ implementation.
360384- A single logical pipeline allows only one active rollout or shutdown at a
361385 time.
386+ - Future group-level consistency can widen the conflict scope so concurrent
387+ operations in the same group return ` 409 Conflict ` .
362388- ` GET /groups/{group}/pipelines/{id} ` always returns the committed
363389 live config, not an uncommitted candidate.
364390- ` GET /groups/{group}/pipelines/{id}/status ` is the best endpoint
0 commit comments