thswlsqls opened a new issue, #8755: URL: https://github.com/apache/paimon/issues/8755
**Search before asking** - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. **Paimon version** master @ 345526e26 (2.0-SNAPSHOT) **Compute Engine** Engine-agnostic (benchmark module, `paimon-benchmark/paimon-micro-benchmarks`) **Minimal reproduce step** Read these five benchmark cases in the `benchmark/bitmap` package: - `RoaringBitmapBenchmark.testDeserialize()`, case `deserialize(DataInputStream(BufferedInputStream))` - `BitmapIndexBenchmark.query()` - `RangeBitmapIndexBenchmark.queryBsi()` / `queryBitmap()` / `queryRangeBitmap()` Each opens a `LocalFileIO.LocalSeekableInputStream` inside the case body and never closes it. Nothing downstream closes it either: `FileIndexReader` implementations do not close the stream they are created from. **What doesn't meet your expectations?** The streams should be released deterministically once the case body ends. - The other three cases in the same method `RoaringBitmapBenchmark.testDeserialize()` already wrap the stream in try-with-resources; only the second case does not. - `LocalFileIO.LocalSeekableInputStream.close()` closes the underlying `FileInputStream`, so skipping it leaves release to the GC. **Anything else?** Fix is to wrap the five sites in try-with-resources. The measured logic (deserialization, index lookup) stays the same. **Are you willing to submit a PR?** - [x] I'm willing to submit a PR! -- 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]
