lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Commented: (LUCENE-674) Error in FSDirectory if incorrectly specified
Date Wed, 20 Sep 2006 21:21:23 GMT
    [ ] 
Hoss Man commented on LUCENE-674:

This sounds like a very similar issue to some past discussion about the path specified when
opening a directory, and what to do if it doesn't exist (ie: create it, or throw an error)
... in general i think it would be unadvisable to assume that if refers to
a bogus directory that we should use the index directory, because that could lead to situations
were typo result in errors silently being ignored to the possible extend of index corruption.

(consider for a moment: two lucene based apps running in two seperate JVM instances on the
same machine, attempting to use hte same index directory; one with a properly set
and one without -- they will most likely crash hard because they would wilently use completley
differnet directories for managing locks).

As with the discussion about index directories that don't exist, applications that *want*
to silenetly assume that a bogus property should result in using the index
directory for lock files can get that behavior if they want (by testing themselves,
and explicitly constructing a SimpleFSLockFactory() on the directory they want to use) but
Lucene should not make any assumptions about what the client application wants in the case
of garbage input.

> Error in FSDirectory if incorrectly specified
> ------------------------------------------------------------
>                 Key: LUCENE-674
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 2.0.0
>         Environment: Reported on a Linux system under Tomcat
>            Reporter: Ryan Holliday
> A user of the JAMWiki project ( reported an error with the following
stack trace:
> SEVERE: Unable to create search instance /usr/share/tomcat5/webapps/jamwiki-0.3.4-beta7/test/base/search/indexen
> Cannot create directory: /temp
>         at
>         at
>         at
>         at
> The culprit is that the property was incorrectly specified on the user's
system.  Lucene could easily handle this issue by modifying the FSDirectory.init() method.
 Currently the code uses the index directory if and org.apache.lucene.lockDir
are unspecified, but it could use that directory if those values are unspecified OR if they
are invalid.  Doing so would make Lucene a bit more robust without breaking any existing installations.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message