Skip to content

fix(connectors): propagate sink plugin consume failure status - #3951

Open
minleejae wants to merge 1 commit into
apache:masterfrom
minleejae:fix-sink-consume-status
Open

fix(connectors): propagate sink plugin consume failure status#3951
minleejae wants to merge 1 commit into
apache:masterfrom
minleejae:fix-sink-consume-status

Conversation

@minleejae

Copy link
Copy Markdown

Binds the iggy_sink_consume FFI status and returns RuntimeError::SinkConsumeFailed { plugin_id, status } on non-zero, matching the existing iggy_sink_open check in the same file. The caller's existing Err path handles logging and skips the processed counter, so a failed batch is no longer counted as processed.

Includes a regression test with stub extern "C" callbacks for both paths — the failure-path test fails on master with expected SinkConsumeFailed, got success and passes with this change.

Closes #3950

@github-actions

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Aug 22, 2026
// the SDK returns non-zero when the sink's consume() errors or the batch cannot
// be deserialized. Ignoring it would count the batch as processed and advance
// consumer offsets over messages the sink never stored — the same silent-loss
// class that the iggy_sink_open status check prevents at startup.

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.

while I agree that the plugin should exit when plugin returns non-zero status, simply exitting the plugin does not solve the problem highlighted in the issue.

I think we should fix the comment and update the issue description to reflect this.

Also see discussion: #2927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

connectors: runtime discards the sink consume FFI status, so failed batches are counted as processed

2 participants