fix(connectors): reject duplicate iggy_sink_open and iggy_source_open#3179
Merged
spetz merged 4 commits intoMay 1, 2026
Merged
Conversation
The sink_connector! and source_connector! macros silently overwrote an existing INSTANCES entry on a duplicate open call, discarding any in-flight buffered data and orphaning the prior connector tasks. Return -1 on duplicate id so callers see the failure and can drain or close explicitly before re-opening. Closes apache#3168. Signed-off-by: Mukunda Rao Katta <mukunda.vjcs6@gmail.com>
Contributor
|
hi, next time before doing work instantly please comment under the issue and wait for green light from maintainer. |
Contributor
Author
|
Acknowledged, sorry for jumping in directly. I'll comment on issues first and wait for green light next time. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3179 +/- ##
============================================
- Coverage 74.06% 71.67% -2.40%
Complexity 943 943
============================================
Files 1161 1188 +27
Lines 102043 113555 +11512
Branches 79076 90729 +11653
============================================
+ Hits 75579 81391 +5812
- Misses 23793 29429 +5636
- Partials 2671 2735 +64
🚀 New features to boost your workflow:
|
spetz
approved these changes
May 1, 2026
numinnex
approved these changes
May 1, 2026
Standing-Man
pushed a commit
to Standing-Man/iggy
that referenced
this pull request
May 6, 2026
…apache#3179) The `sink_connector!` and `source_connector!` macros silently overwrote an existing `INSTANCES` entry when `iggy_sink_open` or `iggy_source_open` was called twice with the same id. Any in-flight buffered data and the prior task were lost without any signal to the caller. Returning -1 on a duplicate id surfaces the mistake so callers drain or close explicitly first. Closes apache#3168
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.
Closes #3168.
The
sink_connector!andsource_connector!macros silently overwrote an existingINSTANCESentry wheniggy_sink_openoriggy_source_openwas called twice with the same id. Any in-flight buffered data and the prior task were lost without any signal to the caller. Returning -1 on a duplicate id surfaces the mistake so callers drain or close explicitly first.Verified
cargo testcannot run locally in this sandbox. CI will validate.