Skip to content

fix(go): prevent native crashes from concurrent record reader access - #844

Open
XiaoHongbo-Hope wants to merge 1 commit into
apache:mainfrom
XiaoHongbo-Hope:codex/fix-go-record-reader-concurrency
Open

XiaoHongbo-Hope wants to merge 1 commit into
apache:mainfrom
XiaoHongbo-Hope:codex/fix-go-record-reader-concurrency

Conversation

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

Purpose

Concurrent calls to NextRecord on one Go RecordBatchReader can poll the same Rust Arrow stream simultaneously. A concurrent Close can also free the stream while it is being polled, causing a native panic or segmentation fault.

Changes

  • Serialize NextRecord and Close per reader.
  • Keep separate readers fully parallel.
  • Cover concurrent reads and read/close races with regression tests.

Verification

  • Concurrent regression tests: 100 iterations passed.
  • Race-enabled regression tests: 10 iterations passed.
  • go vet passed for the binding and test modules.

@XiaoHongbo-Hope XiaoHongbo-Hope changed the title fix(go): serialize record batch reader access fix(go): prevent native crashes from concurrent record reader access Sep 15, 2026
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.

1 participant