[
https://issues.apache.org/jira/browse/LUCENE-5857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14079112#comment-14079112
]
Michael McCandless commented on LUCENE-5857:
--------------------------------------------
It's somewhat dangerous to add this logic to try up to N commits backwards,
e.g. in an app that saves multiple commit points, this could silently lose data
if there is a transient IOException loading the "true" segments_N file. It's
already spooky enough that Lucene tries up to N commits forwards...
But maybe we could fix the logic to explicitly try the segments_N that
segments.gen is pointing to? That would have worked in this case.
I'd like to understand how this index "happened", e.g.:
bq. (speculation: 2fi4 was result of in-memory segment merging)
That shouldn't be the case: merging does not write segments_N files. Only an
explicit commit/IW.close/shutdown does that.
Hmm maybe on hitting an exception while committing, Solr later tries to commit
again instead of rollback?
> make genLookaheadCountLimit configurable, add genLookbackCountLimit parameter
> -----------------------------------------------------------------------------
>
> Key: LUCENE-5857
> URL: https://issues.apache.org/jira/browse/LUCENE-5857
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Christine Poerschke
>
> The problem we saw was that an error-in-final-commit during solr-shutdown led
> to a corrupted segments_.... file which prevented subsequent solr-start,
> details below.
> this change:
> * adds genLookbackCountLimit similar to the existing genLookaheadCountLimit
> * makes both parameters configurable (initial values defaulted to existing
> behaviour)
> error-in-final-commit result:
> * segments_2fi5 file present and zero-bytes long
> (https://issues.apache.org/jira/i#browse/SOLR-6296 concerns root cause)
> * segments_2fi4 file absent on disk (speculation: 2fi4 was result of
> in-memory segment merging)
> * segments_2fi3 file present and usable (but not found by existing
> looking-logic)
> * segments.gen file referenced 2fi3
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]