lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4246) Fix IndexWriter.close() to not commit or wait for pending merges
Date Fri, 04 Apr 2014 11:48:16 GMT

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


Mime
View raw message