powerman2026 opened a new pull request, #1673:
URL: https://github.com/apache/arrow-go/pull/1673

   ### Rationale for this change
   
   Fixes #1672. Releasing a StringView or BinaryView builder before finishing 
an array leaves out-of-line value buffers allocated. Reserving 64 bytes and 
then releasing the builder leaves 32 KiB outstanding with the default block 
size.
   
   ### What changes are included in this PR?
   
   Release the internal block builder when the outer builder's final reference 
is dropped. Finishing an array already transfers its blocks, so they continue 
to live as long as the array needs them.
   
   ### Are these changes tested?
   
   Both regression cases failed with 32768 bytes outstanding on 8f7e2d6. They 
exercise a reservation with no appends and a retained builder reused after 
transferring blocks to an array. The second case reads the original array after 
releasing the builder.
   
   With the change, `go test -race -tags assert,test ./arrow/array` and `go 
test ./...` passed on macOS arm64 with the repository test data configured.
   
   ### Are there any user-facing changes?
   
   Builders now free their outstanding block allocations on release. The public 
API is unchanged.
   
   Prepared with OpenAI Codex.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to