[
https://issues.apache.org/jira/browse/LUCENE-4459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469707#comment-13469707
]
Uwe Schindler commented on LUCENE-4459:
---------------------------------------
There are only a few cases when this can happen and one can reproduce the exact
bug behaviour:
It looks like in some cases, WeakReferences are already cleared before they
appear in the ReferenceQueue (which is perfectly fine). In that case, the
iterator will filter out those removed values, but the size() call later will
still report them.
This is somehow a "bug" in the test (wrong assumption: the ReferenceQueue will
contain the items before they are removed). But we can do better (and make the
test work). We keep the backing map up-to-date by quickly removing the GCed
values in the iterator.
I will attach a patch with some minor cleanups to make the code look like
FilterIterator.
> TestWeakIdentityMap.testConcurrentHashMap fails periodically in jenkins
> -----------------------------------------------------------------------
>
> Key: LUCENE-4459
> URL: https://issues.apache.org/jira/browse/LUCENE-4459
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
>
> There is either a bug, a test bug, or a jvm bug.
> I dont care which one it is, but lets fix the intermittent fail or disable
> the test.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]