lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <DCutt...@grandcentral.com>
Subject RE: cvs commit: jakarta-lucene/src/java/org/apache/lucene/index I ndexReader.java
Date Wed, 26 Dec 2001 16:51:55 GMT
Otis,

Thanks for making these changes!

One comment:

> From: otis@apache.org [mailto:otis@apache.org]
>
>   +    public static boolean isLocked(Directory directory) 
> throws IOException {
>   +	return directory.fileExists("write.lock");
>   +    }
>   +    public static void unlock(Directory directory) throws 
> IOException {
>   +	directory.deleteFile("write.lock");
>   +    }
>    }

There is a chance that the "commit.lock" file could also remain after a
crash, which would also prevent future modification of the index.  So it
would be best to either delete it by name, or to delete all files whose name
ends in .lock.

Cheers,

Doug

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message