Skip to content

fix(connectors): don't use posix function names as FFI interface#2771

Merged
hubcio merged 2 commits into
apache:masterfrom
kriti-sc:fix#2770
Feb 18, 2026
Merged

fix(connectors): don't use posix function names as FFI interface#2771
hubcio merged 2 commits into
apache:masterfrom
kriti-sc:fix#2770

Conversation

@kriti-sc
Copy link
Copy Markdown
Contributor

@kriti-sc kriti-sc commented Feb 18, 2026

Closes #2770

Rationale

The sink_connector! and source_connector! macros export a generic open symbol, which collides with POSIX open() in a cdylib. As a result, calls to open() resolve to the plugin’s FFI function instead of libc, causing argument misinterpretation and a segfault.

What changed?

Renamed the exported FFI symbols to avoid collision with libc/POSIX names:

open → iggy_sink_open / iggy_source_open
close → iggy_sink_close / iggy_source_close
consume → iggy_sink_consume
handle → iggy_source_handle
version → iggy_sink_version / iggy_source_version

Local Execution

  • Passed - Originally implemented for the Delta Sink Connector. This change fixed the segfault.

AI Usage

If AI tools were used, please answer:

  1. Which tools? Claude Code
  2. Scope of usage? Autocomplete
  3. How did you verify the generated code works correctly? The Delta Sink for which this change was originally implemented stopped giving the segmentation error and ran successfully
  4. Can you explain every line of the code if asked? Yes

@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented Feb 18, 2026

rename title to fix(connectors): don't use posix function names as FFI interface

@kriti-sc kriti-sc changed the title fixes #2770 Fix: Rename FFI symbols in connector plugin to avoid collision with POSIX open() and close() Feb 18, 2026
@kriti-sc kriti-sc changed the title Fix: Rename FFI symbols in connector plugin to avoid collision with POSIX open() and close() fix(connectors): don't use posix function names as FFI interface Feb 18, 2026
@kriti-sc
Copy link
Copy Markdown
Contributor Author

Is the connector SDK used by external connectors in iggy/foreign/java/external-processors like the Flink and Pinot connectors? Please excuse the naive question.

@spetz
Copy link
Copy Markdown
Contributor

spetz commented Feb 18, 2026

AFAIR these are part of e.g. Flink ecosystem, not our connectors runtime.

@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented Feb 18, 2026

These external connectors are just using the Iggy Java SDK client (TCP protocol). In principle, these should be in flink repository, not ours.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.91%. Comparing base (f8566c5) to head (7827635).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
core/connectors/sdk/src/source.rs 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2771      +/-   ##
============================================
- Coverage     68.34%   67.91%   -0.43%     
+ Complexity      656      585      -71     
============================================
  Files           741      741              
  Lines         62165    62165              
  Branches      58578    58578              
============================================
- Hits          42484    42217     -267     
- Misses        17571    17860     +289     
+ Partials       2110     2088      -22     
Flag Coverage Δ
rust 69.35% <87.50%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
core/connectors/runtime/src/main.rs 86.09% <100.00%> (ø)
core/connectors/runtime/src/sink.rs 69.27% <100.00%> (+0.55%) ⬆️
core/connectors/runtime/src/source.rs 66.29% <100.00%> (ø)
core/connectors/sdk/src/sink.rs 76.15% <100.00%> (ø)
core/connectors/sdk/src/source.rs 65.71% <50.00%> (-16.43%) ⬇️

... and 25 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.

@hubcio hubcio merged commit 9ecbcc0 into apache:master Feb 18, 2026
39 checks passed
@kriti-sc kriti-sc deleted the fix#2770 branch February 19, 2026 07:40
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.

FFI symbol open in connector plugin macros collides with POSIX open(), causing segfault on local filesystem access

4 participants