Return-Path: Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 50489 invoked from network); 5 Oct 2001 16:35:16 -0000 Received: from unknown (HELO mta.12.com) (65.198.8.41) by daedalus.apache.org with SMTP; 5 Oct 2001 16:35:16 -0000 Received: (qmail 1706 invoked from network); 5 Oct 2001 16:32:41 -0000 Received: from unknown (HELO riker.grandcentral.com) (10.102.15.55) by mta.12.com with SMTP; 5 Oct 2001 16:32:41 -0000 Received: by mail.grandcentral.com with Internet Mail Service (5.5.2653.19) id <42Y1HCWB>; Fri, 5 Oct 2001 09:25:00 -0700 Message-ID: <4BC270C6AB8AD411AD0B00B0D0493DF0EE7C2D@mail.grandcentral.com> From: Doug Cutting To: "'lucene-user@jakarta.apache.org'" Subject: RE: Lucene 1.2 and directory write permissions? Date: Fri, 5 Oct 2001 09:25:00 -0700 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 > From: Snyder, David [mailto:dsnyder@netgenics.com] > > I've been porting our application to use the 1.2 release > candidate 1 build > and now have a problem opening searchers on our existing > indexes. I get a > Permission Denied exception... our permissions are set up to > allow reading > of the directory and contained files during a search, but not writing. Hmm. That is a problem. The reader now creates a lock file while it is opening the index to keep a writer process from deleting files while they're being opened. When opening an index the reader must first read the list of files to open, then open them. If between reading the list and opening a file that file were to disappear, then the open would fail. This was the longstanding race condition that is fixed by the lock files. A writing process will now wait for the reader to open all of the files before updating things. Perhaps we should instead write lock files in a subdirectory of the index named "locks". You could make that directory read/write, but make the parent read-only. Alternately, we could have an flag that turns off the use of lock files, for those who know that there is no other process that is potentially simultaneously updating the index. Which approach would folks prefer? Doug