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

Shai Erera commented on LUCENE-4246:
------------------------------------

I disagree with you about OutStream.close not being transactional ... you know 
what, that's not even the point. You got used to the data being flushed when 
you call OS.close(). Same as you (or anyone else if you would like to pretend 
you're not used to it) got used to documents being committed when you close 
IndexWriter.

There is no good justification changing that behavior for IndexWriter. It's not 
broken ... at least, I didn't hear anyone besides you claiming it is - on 
contrary, I hear more voices against this change.

I think that that we've made changes to the API and Lucene code behavior too 
lightly in the last couple of years. When it's justified because e.g. a user 
might run himself into troubles, then you're right -- that that the program 
worked like that doesn't mean it shouldn't change. But the change you're 
proposing here is likely to cause more damage (even if the damage is mostly 
less convenient coding) than be useful to anyone.

IndexWriter.close() won't be simplified a lot, yet users will need to change 
their code and think what to do with exceptions like 
YouHaveUncommittedChangesException ...

I repeat my proposal again -- let's change close() to never wait for merges 
(i.e. remove the close(boolean) variant) -- that IMO is behavior I doubt if 
people rely on (merges are a form of optimization, not program correctness and 
potential data loss).
                
> 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.0
>
>


--
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]

Reply via email to