lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rutherglen (JIRA)" <>
Subject [jira] Commented: (LUCENE-2083) Use ReadWriteLock in IndexWriter
Date Wed, 18 Nov 2009 23:15:39 GMT


Jason Rutherglen commented on LUCENE-2083:

This is looking hairy because sync on IW is used in so many
different ways (i.e. notifyAll, wait, editing properties,
editing segments, etc), I'm afraid of the little unknown bugs
this patch could create. There's also the nagging issue of RRWL not
supporting in any good way, upgrading read locks to write locks.
Though I'll finish up the patch, test, and watch it break. 

We'd probably also need to migrate to using condition instead of
notifyAll etc. In fact, we'd probably need to remove
synchronized altogether in order to be complete, however I'm
growing hesitant because the patch could leave the entire IW
subsystem with weird bugs that are hard to duplicate. I'm
growing more inclined to move the async logic above IW into
LUCENE-1313 so that the existing Lucene tests don't need to be
rewritten, and we can gain what we're looking (i.e. better
concurrency for NRT) without too much retrofitting. 

> Use ReadWriteLock in IndexWriter
> --------------------------------
>                 Key: LUCENE-2083
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.9.1
>            Reporter: Jason Rutherglen
>            Priority: Minor
>             Fix For: 3.1
> Doing a small patch to make sure things don't break in a big
> way, we'll use RRWL replacing some of the global synchronized
> locks in IndexWriter. 
> We'll read lock during operations that for example delete from a
> segment, and gwrite lock when we're changing the main segment
> infos collection (i.e. we're swapping in new segments after a
> merge, or flushing a new segment). 
> I want to implement this, see if any tests break. 
> Spin off from LUCENE-2047.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message