[
https://issues.apache.org/jira/browse/LUCENE-4246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13536424#comment-13536424
]
Shai Erera commented on LUCENE-4246:
------------------------------------
Today a simple app just calls close(). Now you propose that it will call
close(), but try-catch two exceptions RunningMerges and UncommittedChanges.
Then the poor developer will need to decide what to do with them .. should he
call rollback()? should he call commit()? then close(), only to try-catch those
two ex, now documenting "it's fine now"?
While the app today can choose to call waitForMerges, or close(false), or
commit, then close.
The changes will make the code more verbose and I'm afraid will raise the bar
for simple apps. Aren't you the one that always pushes for simple, more
approachable API?
And with that solution, what would rollback() do? Unless we change rollback to
not close, it's just an alias, as Robert put it, to close, only it doesn't
throw the two new exceptions?
> 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: Robert Muir
> Fix For: 4.1
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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]