You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "minleejae (via GitHub)" <gi...@apache.org> on 2026/08/22 02:04:57 UTC

[PR] fix(connectors): propagate sink plugin consume failure status [iggy]

minleejae opened a new pull request, #3951:
URL: https://github.com/apache/iggy/pull/3951

   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(connectors): propagate sink plugin consume failure status [iggy]

Posted by "kriti-sc (via GitHub)" <gi...@apache.org>.
kriti-sc commented on code in PR #3951:
URL: https://github.com/apache/iggy/pull/3951#discussion_r3836046000


##########
core/connectors/runtime/src/sink.rs:
##########
@@ -748,6 +748,18 @@ async fn process_messages(
     );
     let ffi_elapsed = ffi_start.elapsed();
 
+    // The status code is the plugin's only channel for reporting a failed write:
+    // 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.

Review Comment:
   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: https://github.com/apache/iggy/issues/2927 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(connectors): propagate sink plugin consume failure status [iggy]

Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio closed pull request #3951: fix(connectors): propagate sink plugin consume failure status
URL: https://github.com/apache/iggy/pull/3951


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(connectors): propagate sink plugin consume failure status [iggy]

Posted by "minleejae (via GitHub)" <gi...@apache.org>.
minleejae commented on code in PR #3951:
URL: https://github.com/apache/iggy/pull/3951#discussion_r3837756979


##########
core/connectors/runtime/src/sink.rs:
##########
@@ -748,6 +748,18 @@ async fn process_messages(
     );
     let ffi_elapsed = ffi_start.elapsed();
 
+    // The status code is the plugin's only channel for reporting a failed write:
+    // 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.

Review Comment:
   You're right — reworded the comment and updated the issue description: this change is fail-fast (surfaces the failure, stops counting failed batches as processed), not redelivery, since offsets are already committed at poll time. Happy to adjust this PR to whatever design lands in #2927.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(connectors): propagate sink plugin consume failure status [iggy]

Posted by "hubcio (via GitHub)" <gi...@apache.org>.
hubcio commented on PR #3951:
URL: https://github.com/apache/iggy/pull/3951#issuecomment-5525100214

   closing in favour of #3954, which does the same status bind at `sink.rs:740` plus the offset-commit half you scoped out of here - so a rejected batch isn't just reported, it's redelivered.
   
   nothing wrong with this patch; #3950's repro is what got the runtime fix prioritized. flagged on #3954 that your process_messages unit tests should carry over - it only has integration coverage of that path.
   
   #3950 stays open until #3954 merges. thanks for the repro. @kriti-sc 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(connectors): propagate sink plugin consume failure status [iggy]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3951:
URL: https://github.com/apache/iggy/pull/3951#issuecomment-5377266689

   <!-- iggy-pr-triage-welcome -->
   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](https://github.com/apache/iggy/blob/master/CONTRIBUTING.md#pr-triage-commands) for details.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(connectors): propagate sink plugin consume failure status [iggy]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3951:
URL: https://github.com/apache/iggy/pull/3951#issuecomment-5472336444

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.
   
   If you need a review, please ensure CI is green and the PR is rebased on the latest master. Don't hesitate to ping the maintainers - either `@core` on Discord or by mentioning them directly here on the PR.
   
   Thank you for your contribution!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org