lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (LUCENE-1138) SpellChecker.clearIndex calls unlock inappropriately
Date Thu, 17 Jan 2008 17:01:54 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-1138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Grant Ingersoll resolved LUCENE-1138.
-------------------------------------

       Resolution: Fixed
    Lucene Fields:   (was: [New])

Committed on 612869 and 612868 (branch and trunk)

> SpellChecker.clearIndex calls unlock inappropriately
> ----------------------------------------------------
>
>                 Key: LUCENE-1138
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1138
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/*
>    Affects Versions: 2.3
>            Reporter: Hoss Man
>            Assignee: Grant Ingersoll
>             Fix For: 2.3
>
>         Attachments: LUCENE-1138.patch
>
>
> As noted in LUCENE-1050, fixing a bug in SimpleLockFactory related to not reporting success/filure
of lock file deletion has surfaced bad behavior in SpellChecker.clearIndex...
> Grant...
> {quote}
> It seems the SpellChecker is telling the IndexReader to delete the lockFile, but the
lockFile doesn't exist.
>   ...
> I don't know much about the locking mechanism, but it seems like this should check to
see if the lockFile exists before trying to delete it.
> {quote}
> Hoss...
> {quote}
> Grant: my take on this is that SpellChecker.clearIndex is in the wrong. it shouldn't
be calling unlock unless it has reason to think there is a "stale lock" that needs to be closed
- ie: this is a bug in SpellChecker that you have only discovered because this bug LUCENE-1050
was fixed.
> I would suggest a new issue for tracking, and a patch in which SpellChecker.clearIndex
doesn't call unlock unless isLocked returns true. Even then, it might make sense to catch
and ignore LockReleaseFailedException and let whatever resulting exception may originate from
"new IndexWriter" be returned.
> {quote}
> marking for 2.3 since it seems like a fairly trivial fix, and if we don't deal with it
now it will be a bug introduced in 2.3.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message