[ https://issues.apache.org/jira/browse/LUCENE-1050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559916#action_12559916 ]
Grant Ingersoll commented on LUCENE-1050: ----------------------------------------- Hmm, it seems putting in lockFile.exists() check causes the test to fail... Testcase: testFSDirectoryTwoCreates(org.apache.lucene.store.TestLockFactory): FAILED [junit] writer2.close() should have hit LockReleaseFailedException [junit] junit.framework.AssertionFailedError: writer2.close() should have hit LockReleaseFailedException [junit] at org.apache.lucene.store.TestLockFactory.testFSDirectoryTwoCreates(TestLockFactory.java:193) But, I guess I don't understand why it is failing there, since, based on the comments it says writer2 _SHOULD_ be able to obtain the lock, so why would it then be expected to fail to release it if it already owns it? I guess I get to learn about locks now... > SimpleFSLockFactory ignores error on deleting the lock file > ----------------------------------------------------------- > > Key: LUCENE-1050 > URL: https://issues.apache.org/jira/browse/LUCENE-1050 > Project: Lucene - Java > Issue Type: Bug > Components: Store > Affects Versions: 2.2 > Reporter: Michael McCandless > Assignee: Grant Ingersoll > Priority: Minor > Fix For: 2.3 > > Attachments: LUCENE-1050.patch > > > Spinoff from here: > http://www.gossamer-threads.com/lists/lucene/java-user/54438 > The Lock.release for SimpleFSLockFactory ignores the return value of > lockFile.delete(). I plan to throw a new LockReleaseFailedException, > subclassing from IOException, when this returns false. This is a very minor > change to backwards compatibility because all methods in Lucene that release > a lock already throw IOException. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]