Skip to content

[connectors] Fix completion counters on output removal - #6743

Merged
ryzhyk merged 2 commits into
mainfrom
fix-completion-counters-on-output-removal
Jul 28, 2026
Merged

[connectors] Fix completion counters on output removal#6743
ryzhyk merged 2 commits into
mainfrom
fix-completion-counters-on-output-removal

Conversation

@ryzhyk

@ryzhyk ryzhyk commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

A one-line fix for a real race found by CI.

Describe Manual Test Plan

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

Mark if you think the answer is yes for any of these components:

Describe Incompatible Changes

@ryzhyk
ryzhyk requested a review from blp July 28, 2026 18:57
@ryzhyk ryzhyk added the connectors Issues related to the adapters/connectors crate label Jul 28, 2026

@blp blp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

ryzhyk added 2 commits July 28, 2026 12:01
…away

`total_completed_records` and `total_completed_steps` are the minimum over the
registered output endpoints. An endpoint that has not delivered a step holds both
back, and `disconnect_output` drops an endpoint along with everything still
queued for it, so a departing endpoint never reports the progress the others
already have. `remove_output` only dropped the map entry: the only other refresh
happens on a step or an output batch, and an idle pipeline produces neither, so
the minimum stayed pinned at the departed endpoint's last step forever.

`/completion_status` then reports `inprogress` for a pipeline that has delivered
all of its output, and a checkpoint waiting on `total_completed_records` in
`CheckpointThread::run` never unblocks.

`server::test_with_kafka::test_server` hit this: it opens 200 `/egress` streams
and drops each client instantly, and ~39 of them were still torn down in the
window where the circuit ran the steps carrying the final output.

Failure: https://github.com/feldera/feldera/actions/runs/30380682951/job/90350576953
Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
`wait_for_completion` unwrapped the timeout, so a stall said only that 20 seconds
had passed. Dump the completion status and `/stats` first: the step the token
waits for, next to each connector's `total_processed_steps`, names the endpoint
that is holding `total_completed_steps` back.

Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
@ryzhyk
ryzhyk force-pushed the fix-completion-counters-on-output-removal branch from 707820c to 824b05a Compare July 28, 2026 19:01
@ryzhyk
ryzhyk enabled auto-merge July 28, 2026 19:01
@ryzhyk
ryzhyk added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit 41d63d3 Jul 28, 2026
1 check passed
@ryzhyk
ryzhyk deleted the fix-completion-counters-on-output-removal branch July 28, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connectors Issues related to the adapters/connectors crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants