[
https://issues.apache.org/jira/browse/LUCENE-4061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396721#comment-13396721
]
Shai Erera commented on LUCENE-4061:
------------------------------------
Found it. There was a problem with instructions order -- upon adding a new
category, we mark that the reader should be refreshed *after* we add the
category to the cache. When NoOpCache is used, adding to the cache fails, and
we fail to refresh the reader because the flag is set to true only afterwards.
I added a simple deterministic test that verifies it. Will commit the fix
shortly.
BTW, NoOpCache in this case simulates the case where e.g. LruTaxoWriterCache
just evicts entries from it and we fail to refresh the reader, so this is a
true bug and not related to the use of NoOpCache.
Hopefully this will be the end of it :).
> Improvements to DirectoryTaxonomyWriter (synchronization and others)
> --------------------------------------------------------------------
>
> Key: LUCENE-4061
> URL: https://issues.apache.org/jira/browse/LUCENE-4061
> Project: Lucene - Java
> Issue Type: Improvement
> Components: modules/facet
> Reporter: Shai Erera
> Assignee: Shai Erera
> Fix For: 4.0, 5.0
>
> Attachments: LUCENE-4061.patch, LUCENE-4061.patch
>
>
> DirTaxoWriter synchronizes in too many places. For instance addCategory() is
> fully synchronized, while only a small part of it needs to be.
> Additionally, getCacheMemoryUsage looks bogus - it depends on the type of the
> TaxoWriterCache. No code uses it, so I'd like to remove it -- whoever is
> interested can query the specific cache impl it has. Currently, only
> Cl2oTaxoWriterCache supports it.
> If the changes will be simple, I'll port them to 3.6.1 as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]