[ https://issues.apache.org/jira/browse/LUCENE-6427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14496224#comment-14496224 ]
ASF GitHub Bot commented on LUCENE-6427: ---------------------------------------- GitHub user LucVL opened a pull request: https://github.com/apache/lucene-solr/pull/142 Lucene 6427 bit set fixes Pull request for LUCENE-6427 You can merge this pull request into a Git repository by running: $ git pull https://github.com/LucVL/lucene-solr lucene-6427-BitSetFixes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/142.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #142 ---- commit 957e52debe29ef25cbcd5d260a794d3965e7b717 Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-13T17:22:12Z TestFixedBitSet: Added testBits2Words with various values, concentrating on boundary cases (like for TestLongBitSet) commit 0ad2f508dfefb74c79ed2bf8ea8a8882503bcb1b Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-14T09:52:58Z TestLongBitSet.testBits2Words: Show Integer.MAX_VALUE boundary more clearly commit 8e569310862bd9512bb5320ff6a2c7e19eeb348b Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-14T10:07:39Z Aligned TestFixedBitSet.java and TestLongBitSet.java source files for easier comparison, no real changes. Only real change is in TestLongBitSet.testSmall to have the same range as in TestFixedBitSet.testSmall commit 4ac986ca0f505984cdae88a248c057f94d0fb9cd Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-14T14:39:24Z Removed obsolete mod 64 from FixedBitSet.flip(int) Added LongBitSet.flip(long) Updated TestLongBitSet accordingly commit e67844ddf9a20394ed57209c7d0c333ccd6af9a4 Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-14T07:01:41Z TestFixedBitSet.prove that tests create illegal bitsets commit 06af400f51bf9ccd603d9edc976ae552478f5773 Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-14T14:47:30Z Add same proofs to TestLongBitSet commit e606cd6e73eac7bb7111f44402d87c852141d200 Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-10T16:26:53Z Added verifyGhostBitsClear method that is called in an assert in ensureCapacity to avoid errors in later calls. Marked methods that are prone to such errors in comments Aligned source code of FixedBitSet and LongBitSet for easier side-by-side comparison Test now fail on this verifyGhostBitsClear assert commit 1ed5f16bb892bc19d588d995e759f123d9d267c7 Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-15T08:12:32Z TestFixedBitSet: added more tests to demonstrate spurious failures when ghost bits are present Temporarily disabled assert in FixedBitSet constructor commit 7ca7c6566fbcc9c841339fd1ec2209ceead6aa9f Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-14T15:39:00Z makeFixedBitSet and makeLongBitSet should not create ghost bits Tests pass commit d696ebc11c7db43fac0d2a93db10fc50d69e32e9 Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-15T10:04:31Z Merge branch 'trunk' into BitSetFixes-GhostBits commit e7bab7c6890928227fe18e783ec07489ba272623 Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-15T13:36:58Z Performance: use numWords instead of bits.length in e.g. cardinality() Consistency: Use numBits instead of length() commit 8d0753cb1ba07e67d518d0037f27fba0bfc8dfb4 Author: Luc Vanlerberghe <luc.vanlerber...@bvdinfo.com> Date: 2015-04-15T13:50:38Z Provide a 'slow' isEmpty() implementation that is still faster than any external one could be (e.g.: nextSetBit(0) != -1 for LongBitSet) Called it checkIfEmpty() to emphasize the cost of calling it. ---- > BitSet fixes - assert on presence of 'ghost bits' and others > ------------------------------------------------------------ > > Key: LUCENE-6427 > URL: https://issues.apache.org/jira/browse/LUCENE-6427 > Project: Lucene - Core > Issue Type: Bug > Components: core/other > Reporter: Luc Vanlerberghe > > Fixes after reviewing org.apache.lucene.util.FixedBitSet, LongBitSet and > corresponding tests: > * Some methods rely on the fact that no bits are set after numBits (what I > call 'ghost' bits here). > ** cardinality, nextSetBit, intersects and others may yield wrong results > ** If ghost bits are present, they may become visible after ensureCapacity is > called. > ** The tests deliberately create bitsets with ghost bits, but then do not > detect these failures > * FixedBitSet.cardinality scans the complete backing array, even if only > numWords are in use -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org