Skip to content

[adapters] Warn when the pipeline stalls due to output buffers filling.#5170

Merged
blp merged 1 commit intomainfrom
buffer-stall-warning
Nov 25, 2025
Merged

[adapters] Warn when the pipeline stalls due to output buffers filling.#5170
blp merged 1 commit intomainfrom
buffer-stall-warning

Conversation

@blp
Copy link
Copy Markdown
Member

@blp blp commented Nov 24, 2025

I tested this manually. It seems like a lot of work to test it automatically.

I tested this manually.  It seems like a lot of work to test it
automatically.

Signed-off-by: Ben Pfaff <blp@feldera.com>
@blp blp requested a review from ryzhyk November 24, 2025 20:38
@blp blp self-assigned this Nov 24, 2025
Copilot AI review requested due to automatic review settings November 24, 2025 20:38
@blp blp added connectors Issues related to the adapters/connectors crate user-reported Reported by a user or customer labels Nov 24, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds warning functionality to detect and log when the pipeline stalls due to output buffers being full, helping operators identify backpressure issues.

Key Changes

  • Added next_warning() method to LongOperationWarning to calculate when the next warning should occur
  • Implemented progressive warning logic in the circuit thread's main loop that logs messages when output buffers remain full for extended periods

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/adapters/src/util.rs Added helper method to calculate next warning deadline
crates/adapters/src/controller.rs Integrated backpressure warning tracking in the circuit thread loop

Copy link
Copy Markdown
Contributor

@ryzhyk ryzhyk left a comment

Choose a reason for hiding this comment

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

this is great, thank you!

@blp blp enabled auto-merge November 24, 2025 20:44
@blp blp added this pull request to the merge queue Nov 24, 2025
.get_or_insert_with(|| LongOperationWarning::new(Duration::from_secs(1)));
warning.check(|elapsed| {
info!(
"pipeline stalled {} seconds because output buffers are full",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To make the error message more actionable, would it be possible to add some more user feedback like:

"pipeline stalled {} seconds because output buffers from connector {connector-name} are full (observed output throughput is {} records/second). Pleases tune the output connector or downstream data destination for higher throughputs."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this is absolutely possible, and it would be a better message than what I added. But it would also take me the rest of the day to do, instead of an hour this morning. It's a compromise between insight and implementation time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe merge this and add an issue (possibly even a meta issue) that collects instances like this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Maybe merge this and add an issue (possibly even a meta issue) that collects instances like this.

#5177

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 25, 2025
@blp blp added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit 8eb14bc Nov 25, 2025
5 of 7 checks passed
@blp blp deleted the buffer-stall-warning branch November 25, 2025 03:05
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 user-reported Reported by a user or customer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants