Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@apache.org Received: (qmail 60750 invoked from network); 26 Dec 2001 16:54:00 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Dec 2001 16:54:00 -0000 Received: (qmail 25665 invoked by uid 97); 26 Dec 2001 16:54:03 -0000 Delivered-To: qmlist-jakarta-archive-lucene-dev@jakarta.apache.org Received: (qmail 25618 invoked by uid 97); 26 Dec 2001 16:54:02 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 25607 invoked from network); 26 Dec 2001 16:54:01 -0000 Message-ID: <4BC270C6AB8AD411AD0B00B0D0493DF0EE7DC6@RIKER> From: Doug Cutting To: 'Lucene Developers List' Subject: RE: cvs commit: jakarta-lucene/src/java/org/apache/lucene/index I ndexReader.java Date: Wed, 26 Dec 2001 08:51:55 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: