Hi Grant, do you think we need another RC today so that people can test this.
Otherwise I'll create a (hopefully) final RC end of tomorrow and call a release vote. -Michael [EMAIL PROTECTED] wrote: > Author: gsingers > Date: Thu Jan 17 09:01:01 2008 > New Revision: 612869 > > URL: http://svn.apache.org/viewvc?rev=612869&view=rev > Log: > LUCENE-1050 and LUCENE-1138 fixes for lock problem > > Modified: > > lucene/java/branches/lucene_2_3/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java > > lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/store/SimpleFSLockFactory.java > > lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/store/TestLockFactory.java > > Modified: > lucene/java/branches/lucene_2_3/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java > URL: > http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java?rev=612869&r1=612868&r2=612869&view=diff > ============================================================================== > --- > lucene/java/branches/lucene_2_3/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java > (original) > +++ > lucene/java/branches/lucene_2_3/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SpellChecker.java > Thu Jan 17 09:01:01 2008 > @@ -284,7 +284,9 @@ > * @throws IOException > */ > public void clearIndex() throws IOException { > - IndexReader.unlock(spellIndex); > + if (IndexReader.isLocked(spellIndex)){ > + IndexReader.unlock(spellIndex); > + } > IndexWriter writer = new IndexWriter(spellIndex, null, true); > writer.close(); > } > > Modified: > lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/store/SimpleFSLockFactory.java > URL: > http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/store/SimpleFSLockFactory.java?rev=612869&r1=612868&r2=612869&view=diff > ============================================================================== > --- > lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/store/SimpleFSLockFactory.java > (original) > +++ > lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/store/SimpleFSLockFactory.java > Thu Jan 17 09:01:01 2008 > @@ -145,7 +145,7 @@ > } > > public void release() throws LockReleaseFailedException { > - if (!lockFile.delete()) > + if (lockFile.exists() && !lockFile.delete()) > throw new LockReleaseFailedException("failed to delete " + lockFile); > } > > > Modified: > lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/store/TestLockFactory.java > URL: > http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/store/TestLockFactory.java?rev=612869&r1=612868&r2=612869&view=diff > ============================================================================== > --- > lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/store/TestLockFactory.java > (original) > +++ > lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/store/TestLockFactory.java > Thu Jan 17 09:01:01 2008 > @@ -190,9 +190,9 @@ > if (writer2 != null) { > try { > writer2.close(); > - fail("writer2.close() should have hit > LockReleaseFailedException"); > - } catch (LockReleaseFailedException e) { > // expected > + } catch (LockReleaseFailedException e) { > + fail("writer2.close() should not have hit > LockReleaseFailedException"); > } > } > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]