Search before asking
Paimon version
master @ 345526e (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?
Search before asking
Paimon version
master @ 345526e (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/bitmappackage:RoaringBitmapBenchmark.testDeserialize(), casedeserialize(DataInputStream(BufferedInputStream))BitmapIndexBenchmark.query()RangeBitmapIndexBenchmark.queryBsi()/queryBitmap()/queryRangeBitmap()Each opens a
LocalFileIO.LocalSeekableInputStreaminside the case body and never closes it. Nothing downstream closes it either:FileIndexReaderimplementations 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.
RoaringBitmapBenchmark.testDeserialize()already wrap the stream in try-with-resources; only the second case does not.LocalFileIO.LocalSeekableInputStream.close()closes the underlyingFileInputStream, 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?