pipeline-manager: use runtime status details for connector stats#6564
Conversation
mythical-fred
left a comment
There was a problem hiding this comment.
LGTM — clean refactoring that eliminates per-request HTTP forwarding in favor of piggybacking on the runner's existing /status polling. Three inline notes.
|
|
||
| /// Retrieves the error statistics across all endpoints. | ||
| /// | ||
| /// TODO: how blocking is this? Will this block `/status` under high load? |
There was a problem hiding this comment.
You can close this TODO — retrieve_error_stats is non-blocking. It iterates in-memory InputEndpointStatus/OutputEndpointStatus maps and reads atomics (Ordering::Acquire). No I/O, no locks beyond the one already held by controller.status(). The cost is O(num_connectors) per /status call, which is negligible.
|
|
||
| /// Statistics across all connectors. | ||
| /// | ||
| /// Specifically useful for: `Paused`, `Running`. |
There was a problem hiding this comment.
Since this field is part of the OpenAPI spec (via ToSchema), the rustdoc should mention the staleness window. Something like: "Updated periodically by the runner's status polling (approximately every 1–15 seconds). Values may not reflect the most recent state."
234eeee to
6e6306e
Compare
mythical-fred
left a comment
There was a problem hiding this comment.
Re-approve after force-push. Nice improvements since the last tip:
RuntimeStatusDetailsis now a properToSchemastruct withreason/connector_stats/approval_diff, replacing the generic JSON value in the OpenAPI surface.StorageStatusDetailsgainedToSchemaand switchedVecDeque→Vec(right call for a serialized wire type).- The backward-compatibility comment on
approval_diff(reservingprogram_diffas a discriminator) is a nice piece of forward thinking. - Changelog entry covers both the strong-typing break and the pipeline-upgrade requirement for "Runtime errors" on the pipeline list.
One nit inline.
|
I pushed the necessary UI changes - using |
|
Follow-up on the "Backward compatibility for old pipelines" commit — approval still stands, but a couple of observations on the changelog entry:
The migrator itself is nice — the parametrised |
8dc7d0b to
4bcdc8b
Compare
4bcdc8b to
b2f088c
Compare
b9f1333 to
cf029c2
Compare
cf029c2 to
f90a6c2
Compare
Instead of the manager polling all pipelines every GET request for its list when using the `status_with_connectors` selector, instead incorporate the connector stats into the runtime status details. The details are regularly updated by the runner as it does its `/status` checks. As such, it will take some time for the latest connector stats to show up after this change (approximately between 1-15 seconds). At the cost of this slight staleness, the latency of the GET request for the list of pipelines with that selector will be significantly reduced (up to 10x faster is observed). `StorageStatusDetails` is now the type shown in the API for the `storage_status_details`, instead of the generic JSON value type. The same for `RuntimeStatusDetails`. Backward incompatibility notes: - Pipelines of older versions will continue to have their connector stats shown as before. After the user base has migrated past this change, the GET request fetching fallback can be removed. - Runtime status details were directly used for the approval diff. Now, if this is present (during the `AwaitingApproval` runtime status), it is located at: `deployment_runtime_status_details.approval_diff`. The API converts automatically the old JSON values into the JSON matching the strongly typed `RuntimeStatusDetails`. The Web Console and `fda` clients are adjusted to read the approval diff from the new nested location. Co-authored-by: Karakatiza666 <bulakh.96@gmail.com> Signed-off-by: Karakatiza666 <bulakh.96@gmail.com> Signed-off-by: Simon Kassing <simon.kassing@feldera.com>
f90a6c2 to
c56c5c1
Compare
Instead of the manager polling all pipelines every GET request for its list when using the
status_with_connectorsselector, instead incorporate the connector stats into the runtime status details. The details are regularly updated by the runner as it does its/statuschecks. As such, it will take some time for the latest connector stats to show up after this change (approximately between 1-15 seconds). At the cost of this slight staleness, the latency of the GET request for the list of pipelines with that selector will be significantly reduced (up to 10x faster is observed).StorageStatusDetailsis now the type shown in the API for thestorage_status_details, instead of the generic JSON value type. The same forRuntimeStatusDetails.Backward incompatibility notes:
AwaitingApprovalruntime status), it is located at:deployment_runtime_status_details.approval_diff. The API converts automatically the old JSON values into the JSON matching the strongly typedRuntimeStatusDetails.The Web Console and
fdaclients are adjusted to read the approval diff from the new nested location.PR information
Remaining tasks
deployment_runtime_status_details(@Karakatiza666)