lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4061) Improvements to DirectoryTaxonomyWriter (synchronization and others)
Date Mon, 11 Jun 2012 12:09:44 GMT


Shai Erera updated LUCENE-4061:

    Attachment: LUCENE-4061.patch

Fixing the concurrency issue was hairy, and required lots of changes to DirTaxoWriter:

* Needed a ReaderManager, so added such in core under o.a.l.index. Separately, I think that
we should move RefManager to o.a.l.util instead of

* DirTaxoWriter was not very well built for concurrency :), so many changes had to be done
to it.

* TaxoWriterCache.hasRoom(int) has been replaced by isFull().

* TestDirTaxoWriter has been enhanced to sometimes, during nightly builds, use a NoOpCache,
as it uncovered some bugs too ! (yet it makes the test horribly slow, hence why the nightly
criteria, and very low chances still).

I ran DirTaxoWriter.testConcurrency over 1000 times and no failures, so I'm inclined to believe
the concurrency issues are now resolved. Still, a second (and third and even a forth) look
by someone else would be appreciated.

I'll commit it tomorrow if no one will object, and port to 4x.
> Improvements to DirectoryTaxonomyWriter (synchronization and others)
> --------------------------------------------------------------------
>                 Key: LUCENE-4061
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 4.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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message