You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2012/06/11 14:07:42 UTC
[jira] [Commented] (LUCENE-4128) add safety to preflex segmentinfo
"upgrade"
[ https://issues.apache.org/jira/browse/LUCENE-4128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292765#comment-13292765 ]
Robert Muir commented on LUCENE-4128:
-------------------------------------
We write a codec header for the upgraded marker file, so instead of relying upon File.exists we could add a deprecated method
to SegmentInfos hasMarkerFile that just opens it and does CheckHeader, returning false if there is any exception?
> add safety to preflex segmentinfo "upgrade"
> -------------------------------------------
>
> Key: LUCENE-4128
> URL: https://issues.apache.org/jira/browse/LUCENE-4128
> Project: Lucene - Java
> Issue Type: Bug
> Affects Versions: 4.0
> Reporter: Robert Muir
> Assignee: Michael McCandless
> Fix For: 4.0
>
> Attachments: LUCENE-4128.patch
>
>
> Currently the one-time-upgrade depends on whether the upgraded .si file exists. And the writing is done in a try/finally so its removed if ioexception happens.
> but I think there could be a power-loss or something else in the middle of this, the upgraded .si file could be bogus, then the user would have to manually remove it (they probably wouldnt know).
> i think instead we should just have a marker file on completion, that we create after we successfully fsync the upgraded .si file. this way if something happens we just rewrite the thing.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org