Skip to content

[benchmark] Close seekable input streams in bitmap benchmarks - #8756

Closed
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/benchmark-close-bitmap-input-streams
Closed

[benchmark] Close seekable input streams in bitmap benchmarks#8756
thswlsqls wants to merge 1 commit into
apache:masterfrom
thswlsqls:fix/benchmark-close-bitmap-input-streams

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #8755

  • Wrap the LocalFileIO.LocalSeekableInputStream of five benchmark/bitmap cases in try-with-resources: RoaringBitmapBenchmark.testDeserialize() (second case), BitmapIndexBenchmark.query(), and RangeBitmapIndexBenchmark.queryBsi() / queryBitmap() / queryRangeBitmap().
  • The other three cases in RoaringBitmapBenchmark.testDeserialize() already use try-with-resources — the second case was the only one missing it.
  • LocalFileIO.LocalSeekableInputStream.close() closes the underlying FileInputStream, so without it release is left to the GC.
  • Widen catch (FileNotFoundException) to catch (IOException) in the four query methods, required now that close() is on the path. The measured logic is unchanged.

Tests

  • No test added: this module has no *Test class (all 17 files are benchmarks) and the change only affects cleanup.
  • mvn spotless:check and mvn -DskipTests clean test-compile on paimon-benchmark/paimon-micro-benchmarks passed.
  • The @Test methods here run real benchmarks, so they were not run locally.

@JingsongLi

Copy link
Copy Markdown
Contributor

Don't make these pointless changes!

@JingsongLi JingsongLi closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Bitmap benchmarks do not close seekable input streams

2 participants