You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Patzifist (via GitHub)" <gi...@apache.org> on 2026/07/01 00:39:24 UTC

Re: [PR] fix(parquet/metadata): Fix sync.Pool memory leak and capacity destruction in GetColumnBloomFilter [arrow-go]

Patzifist commented on PR #864:
URL: https://github.com/apache/arrow-go/pull/864#issuecomment-4849168486

   Based on your feedback, I have updated the PR to implement **Option A (scoped accessor)**:
   
   1. **Implemented `VisitColumnBloomFilter`**: Added the scoped accessor method with a closure `func(BloomFilter) error`. It uses `defer` to promptly recycle the buffer right after the callback terminates.
   2. **Deterministic recycling**: The internal helper cancels the `AddCleanup` to prevent double-returning, shrinks the buffer using `ResizeNoShrink(0)`, and safely returns it to the pool.
   3. **Fixed the Benchmark**: Rewrote the benchmark using `b.RunParallel` and proper isolated calls (`b.ResetTimer() / b.ReportAllocs()`) so that `B/op` and `allocs/op` now genuinely reflect a single filter read.
   
   Please take a look when you have a moment!


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org