Index: lucene/contrib/misc/src/java/org/apache/lucene/index/NRTManager.java =================================================================== --- lucene/contrib/misc/src/java/org/apache/lucene/index/NRTManager.java (revision 1198594) +++ lucene/contrib/misc/src/java/org/apache/lucene/index/NRTManager.java (working copy) @@ -301,10 +301,14 @@ public synchronized void close() throws IOException { reopenLock.lock(); try { - IOUtils.close(withDeletes, withoutDeletes); - newGeneration.signalAll(); + try { + IOUtils.close(withDeletes, withoutDeletes); + } finally { // make sure we signal even if close throws an exception + newGeneration.signalAll(); + } } finally { reopenLock.unlock(); + assert withDeletes.generation == Long.MAX_VALUE && withoutDeletes.generation == Long.MAX_VALUE; } }