[Bug] Bitmap benchmarks do not close seekable input streams
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- java
- Domain
- performance
Research direction
Start in the benchmark/bitmap package with RoaringBitmapBenchmark.testDeserialize(), BitmapIndexBenchmark.query(), and RangeBitmapIndexBenchmark.queryBsi(), queryBitmap(), and queryRangeBitmap(). Compare the five sites with the existing try-with-resources cases, then run the bitmap benchmarks or relevant benchmark tests. Done means each opened LocalFileIO.LocalSeekableInputStream is closed while the measured logic remains unchanged.
Written by the indexing model from the issue text.
Description
Search before asking
- I searched in the 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(), casedeserialize(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 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?
- I'm willing to submit a PR!
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.4k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 468
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/paimon
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
[Bug] [Hive] IndexOutOfBoundsException when converting an unavailable dynamic BETWEEN predicate Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100