dweiss commented on code in PR #12751:
URL: https://github.com/apache/lucene/pull/12751#discussion_r1381608903
##########
lucene/core/src/java/org/apache/lucene/index/IndexWriter.java:
##########
@@ -2560,10 +2560,15 @@ private void rollbackInternalNoCommit() throws
IOException {
// close all the closeables we can (but important is readerPool and
writeLock to prevent
// leaks)
- IOUtils.closeWhileHandlingException(readerPool, deleter, writeLock);
- writeLock = null;
- closed = true;
- closing = false;
+ try {
+ IOUtils.closeWhileHandlingException(readerPool, deleter,
writeLock);
+ } catch (Throwable t) {
Review Comment:
this was deliberate so that notifyAll would still be called, even if
something happened. In fact, the finally block is not necessary - it's a
drop-through with catch (Throwable), I just wanted to make it explicit that we
need to set those fields.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]