Re: Possible thread safety problem in CachingWrapperFilter

2007-09-04 Thread Yonik Seeley
On 9/4/07, Chris Hostetter <[EMAIL PROTECTED]> wrote: > : and should the cache accesses also use synchronized(this) ? > > I can't see a need for that ... then the same instance couldn't be used on > two distinct readers in parallel threads ... but that should be fine. synchronized (this) will prov

Re: Possible thread safety problem in CachingWrapperFilter

2007-09-04 Thread Paul Elschot
On Tuesday 04 September 2007 21:03, Chris Hostetter wrote: > > : if (cache == null) { > : cache = new WeakHashMap(); > : } > : > : I think the initial snippet is not thread safe and might result > : in two threads initializing this cache to different objects, > : possibly conflicti

Re: Possible thread safety problem in CachingWrapperFilter

2007-09-04 Thread Chris Hostetter
: if (cache == null) { : cache = new WeakHashMap(); : } : : I think the initial snippet is not thread safe and might result : in two threads initializing this cache to different objects, : possibly conflicting with the cache accesses after that: i believe you are write ... if Threa

[jira] Updated: (LUCENE-992) IndexWriter.updateDocument is no longer atomic

2007-09-04 Thread Michael McCandless (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless updated LUCENE-992: -- Lucene Fields: [New, Patch Available] (was: [New]) > IndexWriter.updateDocument is no

[jira] Updated: (LUCENE-992) IndexWriter.updateDocument is no longer atomic

2007-09-04 Thread Michael McCandless (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless updated LUCENE-992: -- Attachment: LUCENE-992.patch Attached patch. I added a unit test that runs 2 indexing

[jira] Created: (LUCENE-992) IndexWriter.updateDocument is no longer atomic

2007-09-04 Thread Michael McCandless (JIRA)
IndexWriter.updateDocument is no longer atomic -- Key: LUCENE-992 URL: https://issues.apache.org/jira/browse/LUCENE-992 Project: Lucene - Java Issue Type: Bug Components: Index Affect

Possible thread safety problem in CachingWrapperFilter

2007-09-04 Thread Paul Elschot
I'm trying to change the CachingWrapperFilter class to cache a SortedVIntList for LUCENE-584. That is progressing nicely, but I found this snippet at the beginning of the current CachingWrapperFilter.bits() method: if (cache == null) { cache = new WeakHashMap(); } I think the initi

[jira] Commented: (LUCENE-743) IndexReader.reopen()

2007-09-04 Thread Nat (JIRA)
[ https://issues.apache.org/jira/browse/LUCENE-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524694 ] Nat commented on LUCENE-743: Please also consider making an option where the reopen can be automated (i.e. when the inde