Skip to content

fix(connectors): reject duplicate iggy_sink_open and iggy_source_open#3179

Merged
spetz merged 4 commits into
apache:masterfrom
MukundaKatta:fix/sink-source-connector-duplicate-open
May 1, 2026
Merged

fix(connectors): reject duplicate iggy_sink_open and iggy_source_open#3179
spetz merged 4 commits into
apache:masterfrom
MukundaKatta:fix/sink-source-connector-duplicate-open

Conversation

@MukundaKatta
Copy link
Copy Markdown
Contributor

Closes #3168.

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.

Verified cargo test cannot run locally in this sandbox. CI will validate.

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>
@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented Apr 26, 2026

hi, next time before doing work instantly please comment under the issue and wait for green light from maintainer.

@MukundaKatta
Copy link
Copy Markdown
Contributor Author

Acknowledged, sorry for jumping in directly. I'll comment on issues first and wait for green light next time.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 36.36364% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.67%. Comparing base (87e22a1) to head (6d04241).
⚠️ Report is 37 commits behind head on master.

Files with missing lines Patch % Lines
core/connectors/sdk/src/source.rs 28.57% 5 Missing ⚠️
core/connectors/sdk/src/sink.rs 50.00% 2 Missing ⚠️
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     
Components Coverage Δ
Rust Core 71.98% <36.36%> (-3.32%) ⬇️
Java SDK 62.30% <ø> (+2.15%) ⬆️
C# SDK 69.40% <ø> (+0.02%) ⬆️
Python SDK 81.43% <ø> (ø)
Node SDK 91.52% <ø> (+0.11%) ⬆️
Go SDK 39.41% <ø> (-0.19%) ⬇️
Files with missing lines Coverage Δ
core/connectors/sdk/src/sink.rs 80.00% <50.00%> (+3.17%) ⬆️
core/connectors/sdk/src/source.rs 76.78% <28.57%> (+11.07%) ⬆️

... and 151 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MukundaKatta MukundaKatta changed the title connectors/sdk: reject duplicate iggy_sink_open and iggy_source_open fix(connectors): reject duplicate iggy_sink_open and iggy_source_open Apr 30, 2026
@spetz spetz merged commit 5fbeddc into apache:master May 1, 2026
53 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sink_connector! macro silently discards buffered data on duplicate iggy_sink_open with same ID

4 participants