Skip to content

fix(arrow/cdata): make nativeCRecordBatchReader deterministic#793

Open
zeroshade wants to merge 3 commits intoapache:mainfrom
zeroshade:deterministic-cdata
Open

fix(arrow/cdata): make nativeCRecordBatchReader deterministic#793
zeroshade wants to merge 3 commits intoapache:mainfrom
zeroshade:deterministic-cdata

Conversation

@zeroshade
Copy link
Copy Markdown
Member

Rationale for this change

Instead of relying on a finalizer, make the nativeCRecordBatchReader use atomic Retain and Release to make releasing deterministic.

What changes are included in this PR?

Remove the finalizer, call C.ArrowArrayRelease and C.ArrowArrayStreamRelease based on refcount.

Are these changes tested?

Yes, tests cover this already.

Are there any user-facing changes?

Only that retain and release now properly control the determinism of releasing the C memory instead of relying on a finalizer.

@zeroshade zeroshade requested a review from lidavidm April 30, 2026 17:15
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