Fix two races in controller.rs - #6786
Merged
Merged
Conversation
The backpressure thread recorded an endpoint id in `running_endpoints` before checking for that endpoint's reader, so an endpoint that was registered but not yet opened lost its only `extend()`: `insert` returned false on every later scan, leaving the endpoint paused forever. Skip a reader-less endpoint instead, and the scan that follows `add_input_endpoint`'s unpark starts it. `add_input_endpoint` registers an endpoint with `reader: None` and installs the reader only after `open` returns, a window open since d24ba40. Only endpoints added to a running pipeline can land in that window, because the connectors named in the pipeline configuration are all created before the backpressure thread starts. Every HTTP `/ingress` push creates such an endpoint, and the endpoint blocks in `complete_request` until `extend` arrives, so a lost command hangs the request until the client gives up. That is how `server::test_http::test_concurrent_bootstrap` failed in CI, where the client timed out after 120 seconds, and the same window can hang an ingress request in production. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
…ance `add_input_endpoint` compares the endpoint's fault tolerance with the pipeline's only after it has registered and opened the endpoint, and the rejection path returned the error without undoing either step. The endpoint stayed in the status map, where it could never run because the error path also skipped the unpark that starts it, yet it still counted toward the pipeline's statistics and reserved its own name against a later attempt to add the connector. Disconnect it instead, which both removes the entry and shuts the reader down. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
gz
approved these changes
Aug 1, 2026
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.
See commit messages.
Describe Manual Test Plan
Checklist
Breaking Changes?
Mark if you think the answer is yes for any of these components:
Describe Incompatible Changes