lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7959) Throw more helpful error messages from failures in obtainFSLock, at least in NativeFSLockFactory
Date Sat, 09 Sep 2017 06:18:00 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-7959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16159777#comment-16159777
] 

ASF subversion and git services commented on LUCENE-7959:
---------------------------------------------------------

Commit bcdac5fef3ac0a8de074ca8308206e39d81e439f in lucene-solr's branch refs/heads/branch_7x
from [~rcmuir]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bcdac5f ]

LUCENE-7959: Improve NativeFSLockFactory's NoSuchFileException


> Throw more helpful error messages from failures in obtainFSLock, at least in NativeFSLockFactory
> ------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-7959
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7959
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>            Priority: Minor
>         Attachments: LUCENE-7959.patch, LUCENE-7959_untested.patch
>
>
> This is one of those small changes that would save a lot of pain for end users. 
> Let's say that there's a permissions issue with the index dir. The user will get "NoSuchFileException:
write.lock" but not understand why the lock file is missing (its because it could not be created).
This is an unhelpful/misleading error message (recent user's list discussion about this).
> The problem is that when we try to create the lock file we swallow _all_ exceptions,
not just the one we don't care about (Thanks [~elyograg] for pointing this out).
>  {{   
>    try {
>       Files.createFile(lockFile);
>     } catch (IOException ignore) {
>       // we must create the file to have a truly canonical path.
>       // if it's already created, we don't care. if it cant be created, it will fail
below.
>     }
> }}
> It fails later with NoSuchFileException, which does not provide enough information.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message