OpenBitSet should report the configured capacity/size [LUCENE-3281]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
OpenBitSet rounds up the capacity() to the next multiple of 64 from what was specified. However, this is particularly damaging with the new asserts, which trigger when anything above the specified capacity is used as an index. The simple fix is to return numBits for capacity().
---
Migrated from [LUCENE-3281](https://issues.apache.org/jira/browse/LUCENE-3281) by Robert Ragno (@rragno)
Contributor guide
Research direction
Search the Lucene source for OpenBitSet and its capacity() method, then read how numBits and the assertion checks are used. Confirm the configured capacity is reported consistently and run the existing OpenBitSet tests, adding coverage for the reported capacity if the current tests do not exercise it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100