OpenBitSet has a 'assert-only' variable called numBits, which is not always correctly updated [LUCENE-4233]
Open
affects-version:3.6
affects-version:4.1
legacy-jira-priority:Trivial
type:bug
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
If I call ensureCapacity the variable numBits is not correctly updated.
numBits is updated if I call the (protected!) method expandingWordNum.
Probably related to #LUCENE-3281
---
Migrated from [LUCENE-4233](https://issues.apache.org/jira/browse/LUCENE-4233) by Peter Karich
Contributor guide
Research direction
Start by locating OpenBitSet and inspect ensureCapacity alongside the protected expandingWordNum method, where the issue says numBits is updated. Confirm the expected numBits value after ensureCapacity and add a regression test covering that call; done means the assert-only variable is updated consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100