Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9621

pendingNumDocs doesn't match totalMaxDoc if tragedy on flush()

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 8.6.3
    • None
    • core/index
    • None
    • New

    Description

      While implementing a test to trigger an OutOfMemoryError on flush() in https://github.com/apache/lucene-solr/pull/2088, I noticed that the OOME was followed by an assertion failure on rollback with the following stacktrace:

      java.lang.AssertionError: pendingNumDocs 1 != 0 totalMaxDoc
      	at __randomizedtesting.SeedInfo.seed([ABBF17C4E0FCDEE5:DDC8E99910AFC8FF]:0)
      	at org.apache.lucene.index.IndexWriter.rollbackInternal(IndexWriter.java:2398)
      	at org.apache.lucene.index.IndexWriter.maybeCloseOnTragicEvent(IndexWriter.java:5196)
      	at org.apache.lucene.index.IndexWriter.tragicEvent(IndexWriter.java:5186)
      	at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3932)
      	at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3874)
      	at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3853)
      	at org.apache.lucene.index.TestIndexWriterDelete.testDeleteAllRepeated(TestIndexWriterDelete.java:496)
      

      We should probably look into how exactly we behave with this kind of tragedy on flush().

      Attachments

        Activity

          People

            Unassigned Unassigned
            msfroh Michael Froh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: