[
https://issues.apache.org/jira/browse/LUCENE-3872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230293#comment-13230293
]
Robert Muir commented on LUCENE-3872:
-------------------------------------
I don't have a better fix, but at the same time i feel you should be able to
close() at any time,
(such as when handling exceptions in your app), since we are a real closeable
here.
> Index changes are lost if you call prepareCommit() then close()
> ---------------------------------------------------------------
>
> Key: LUCENE-3872
> URL: https://issues.apache.org/jira/browse/LUCENE-3872
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 3.6, 4.0
>
> Attachments: LUCENE-3872.patch, LUCENE-3872.patch
>
>
> You are supposed to call commit() after calling prepareCommit(), but... if
> you forget, and call close() after prepareCommit() without calling commit(),
> then any changes done after the prepareCommit() are silently lost (including
> adding/deleting docs, but also any completed merges).
> Spinoff from java-user thread "lots of .cfs (compound files) in the index
> directory" from Tim Bogaert.
> I think to fix this, IW.close should throw an IllegalStateException if
> prepareCommit() was called with no matching call to commit().
--
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: [email protected]
For additional commands, e-mail: [email protected]