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

Michael McCandless updated LUCENE-6505:
---------------------------------------
    Attachment: LUCENE-6505.patch

Patch, with tests and fixes for these cases.

I explored removing SegmentInfos.lastGeneration (failing to update
that was the cause of the first issue) but it makes me nervous because
on a non-tragic exception during commit it could mean that IW's
segmentInfos, and any subsequently opened NRT reader, points to a
non-existent (future) segments file, and could maybe also mean that
IFD deletes the still-live one.

I also tweaked infoStream logging a bit so IW says when it wrote the
pending_segments_N, and is more timely saying when it wrote the final
segments_N (so it no longer looks like it removed the old one before
writing the new one!).


> NRT readers don't always reflect last commit
> --------------------------------------------
>
>                 Key: LUCENE-6505
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6505
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: Trunk, 5.3
>
>         Attachments: LUCENE-6505.patch
>
>
> Two cases here:
>   * When I pull an NRT reader from IW,
>     IR.getIndexCommit().getSegmentsFileName() should reflect what was
>     last committed, but doesn't now
>   * If I call IW.commit(), or IW.setCommitData(), but make no other
>     changes, and then open a new NRT reader, I think it should reflect
>     the new commit, but doesn't now



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to