Skip to content

fix(arrow/util): release protobuf record builders - #1084

Merged
zeroshade merged 2 commits into
apache:mainfrom
fallintoplace:fix/protobuf-record-cleanup
Aug 5, 2026
Merged

fix(arrow/util): release protobuf record builders#1084
zeroshade merged 2 commits into
apache:mainfrom
fallintoplace:fix/protobuf-record-cleanup

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What changed

Construct protobuf records through RecordBuilder.NewRecordBatch and release the builder after ownership transfers to the returned record. Record test helpers now release returned batches as well.

Why

The manual conversion retained the record builder, each temporary field array, and the intermediate struct array. Releasing the returned record did not release those extra references.

Testing

  • go test ./arrow/util
  • Added checked-allocator coverage for the complete record lifecycle

@fallintoplace
fallintoplace force-pushed the fix/protobuf-record-cleanup branch from 9d8d858 to de03bd0 Compare August 1, 2026 22:50
@zeroshade
zeroshade merged commit 935f644 into apache:main Aug 5, 2026
23 checks passed
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.

2 participants