[ 
http://jira.codehaus.org/browse/MINDEXER-2?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tamás Cservenák closed MINDEXER-2.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0.0
                   3.2.0

With no configuration changes, NexusIndexer is threadsafe from now on.

New locking semantics introduced to be able to cope with multithreaded 
processing. This mostly affects server-like apps integrating the indexer, not 
as much IDEs.

IndexContext new methods:

* commit/rollback -- for commiting changes, but also reopening 
readers/searchers if appropriate.
* lock/unlock -- to perform shared locking, guaranteeing no reader/searcher 
reopen will occur.

IteratorSearchResult/IteratorResultSet new methods:

* both become Closeable. If you do NOT consume all of iterator (when automatic 
cleanup happens), you have to explicitly call result.close() to release locks!

Aside managing/closing non-consumed IteratorSearchResults, if integrator does 
not tamper with contexts directly (relies on NexusIndexer interface), no 
further change needed.

Others:

* warmUp of readers/searchers added, currently a naive implementation, later we 
can refine it
* smaller fixes

Notes: if an app integrating Indexer Core did NOT tamper with indexingContexts 
directly (by using one of it's ctx.getIndexWriter(), ctx.getIndexReader() and 
ctx.getIndexSearcher()), it should almost not notice anything. The only change 
needed is to explicitly close non-consumed IteratorSearchResults. Otherwise, 
you have to adapt and manually fiddle with locking of contexts, or use proper 
API calls. In future, these methods and direct IndexingContext use within 
integrating applications will be highly discouraged!

> Make Indexer threadsafe
> -----------------------
>
>                 Key: MINDEXER-2
>                 URL: http://jira.codehaus.org/browse/MINDEXER-2
>             Project: Maven Indexer
>          Issue Type: New Feature
>            Reporter: Tamás Cservenák
>            Assignee: Tamás Cservenák
>             Fix For: 3.2.0, 4.0.0
>
>
> Make Indexer threadsafe.
> Currently, a lot of burden is on integrating application to handle all the 
> concurrency issues _around_ Indexer. Indexer -- aside of configuration -- 
> should be thread safe, at least with "most common" operations like searches, 
> index additions, index removals.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to