Skip to content

[Bug] Bitmap benchmarks do not close seekable input streams #8755

Description

@thswlsqls

Search before asking

  • I searched in the issues and found nothing similar.

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?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions