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

Simon Willnauer commented on LUCENE-4246:
-----------------------------------------

bq. Actually, this is a very important check, because otherwise you can 
silently lose changes on shutdown; see LUCENE-3872. Basically, if you call 
prepareCommit, then index a bunch of docs, then call shutdown, those docs will 
be lost because prepareCommit took a point-in-time snapshot before you indexed 
the docs, and it's that snapshot that is committed by shutdown.

ok so this is actually why I ask... in that case I think adding the boolean to 
shutDown is a good idea since writing this yourself seems more complicated than 
just call flush(true, true) && abortMerges() && commit && close ?

> Fix IndexWriter.close() to not commit or wait for pending merges
> ----------------------------------------------------------------
>
>                 Key: LUCENE-4246
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4246
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>             Fix For: 4.8
>
>         Attachments: LUCENE-4246.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to