You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2012/05/16 15:07:02 UTC

[jira] [Updated] (LUCENE-4061) Improvements to DirectoryTaxonomyWriter (synchronization and others)

     [ https://issues.apache.org/jira/browse/LUCENE-4061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shai Erera updated LUCENE-4061:
-------------------------------

    Attachment: LUCENE-4061.patch

Patch does the following:

* Removes getCacheMemoryUsage()
* Handles few TODOs (e.g. don't use MultiFields)
* Improves synchronization of addCategory -- only if the category is not found, then it synchronizes and proceeds with the original logic.
* Made addCategoryDocument private -- this is a very dangerous method to call by extending classes.
* Made the TaxoWriterCache impls thread-safe.
* Added a concurrency test to validate synchronization works
* Modified TestAddTaxonomy to run *much* faster by building the taxonomy in parallel.

All tests pass, and run even faster now. I plan to commit this soon.
                
> 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
>
>         Attachments: 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org