dweiss commented on code in PR #12751: URL: https://github.com/apache/lucene/pull/12751#discussion_r1382620003
########## 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) { + throwable.addSuppressed(t); + } finally { + writeLock = null; + closed = true; + closing = false; + } // So any "concurrently closing" threads wake up and see that the close has now completed: notifyAll(); Review Comment: Yep, looks good. I'm sorry for replying late - I was away and couldn't do it properly before. I'll post a patch in a minute. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org