lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trejkaz (JIRA)" <>
Subject [jira] Created: (LUCENE-2607) IndexWriter.isLocked() fails on a read-only directory
Date Wed, 18 Aug 2010 00:19:16 GMT
IndexWriter.isLocked() fails on a read-only directory

                 Key: LUCENE-2607
             Project: Lucene - Java
          Issue Type: Bug
    Affects Versions: 2.9.2
            Reporter: Trejkaz

This appears to be a regression of some sort because the issue was only discovered by us some
time after upgrading to the 2.9 series, and was not present when we were using 2.3 (big gap
between those two, though.)

We had some code like:

    if (IndexWriter.isLocked(directory))

And now we get an exception when this code runs on a read-only location:

java.lang.RuntimeException: Failed to acquire random test lock; please verify filesystem for
lock directory 'X:\Data\Index' supports locking at
at at at
    org.apache.lucene.index.IndexWriter.isLocked( at

I think it makes more logical sense to return *false* - if locking is not possible then it
cannot be locked, therefore isLocked should always return false.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message