lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject RE: cvs commit: jakarta-lucene/src/java/org/apache/lucene/index I ndexReader.java
Date Wed, 26 Dec 2001 17:16:48 GMT
Yes, I thought there would be more .lock files, I just didn't know what
their names are.  Thanks for checking, I'll fix the code now.

Otis

--- Doug Cutting <DCutting@grandcentral.com> wrote:
> 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>
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
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