No one seems to have responded to this yet, so I'll give a first shot. There were a few changes that I am aware of that occured in the locking area. One of Lucene's locking rules is that IndexWriter cannot co-exist with an "deleting" IndexReader. An IndexReader becomes "deleting" when delete method is called on it. If one of these exists, trying to open the other one will cause the exception you are observing (I believe). The changes in this area were in tightening the logic enforcing this rule. There were a couple of test cases submitted, TestIndexReader.java I believe, that illustrated two conditions that were not handled properly in the old code. They are now handled correctly, but there is still an open issue regarding the timestamp resolution in Mac OSX that uses an older filesytem (I'm not a Mac user myself, so I don't know what that file system is called). Apparently that filesystem can only resolve timestamps up to a second, so the locking logic, which is based on the file timestamps, can fail. The same failure can (and does) also occur on other filesystems, but it would occur on Mac more often. Again, try the test case. Apparently one of the two test cases still fails on Mac OSX.

If you search for Mac in the last week of the traffic on this list you will find more information about this issue and some suggested fixes. There was also a discussion about which of the multiple proposed evils would be better, but there is still no resolution to this issue.

Good luck.
Dmitry.

P.S.: it might be helpful if you include a more complete stack trace of the exception you are seeng, such that it would show what operations are being attempted when the failure occurs.

petite_abeille wrote:

Hello,

I recently updated from 1.3 RC1 to the latest cvs version. RC1 has proven very reliable for me, but I needed Dmitry compound index functionality. Therefore the move to the cvs version.

I have been using 1.3 RC1 without any problem. But... since updating to the cvs version, I'm getting a lot of apparently random IOException related to locking:

java.io.IOException: Index locked for write: Lock@/tmp/lucene-5b228139f8fe55f7c74441a7d59f8f89-write.lock
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:173)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:150)


This is most likely due to some problem on my side, but for the life of me I cannot track it down nor reproduce it :(

Also, the only change related to Lucene on my side was the update from 1.3 RC1 to the cvs version. Perhaps this has triggered a "dormant" bug in my app. Or perhaps something has changed in the cvs version which impact me negatively. Other way, I'm at loss.

My guess would be that this is most likely a threading issue. On my side, I use a very conservative threading which supposedly synchronized any access to Lucene. And this hasn't changed for a good while.

Any idea where I should look in such a situation? Any "significant" changes related to locking on Lucene side?

For the record, this problem seems to mostly manifest itself under Mac OS X, running Java 1.4.1_01.

Thanks.

Cheers,

PA.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to