diff --git a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java index 20916b5dd12..0dd39c32180 100644 --- a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java +++ b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java @@ -552,16 +552,6 @@ final class DocumentsWriterFlushControl implements Accountable, Closeable { for (final DocumentsWriterPerThread next : perThreadPool.filterAndLock(dwpt -> dwpt.deleteQueue == flushingQueue)) { try { - assert next.deleteQueue == flushingQueue || next.deleteQueue == documentsWriter.deleteQueue - : " flushingQueue: " - + flushingQueue - + " currentqueue: " - + documentsWriter.deleteQueue - + " perThread queue: " - + next.deleteQueue - + " numDocsInRam: " - + next.getNumDocsInRAM(); - if (next.getNumDocsInRAM() > 0) { final DocumentsWriterPerThread flushingDWPT; synchronized (this) {