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

SoftDeleteCount assertion in SoftPendingDeletes violated

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.4
    • 7.4.1, 7.5, 8.0
    • None
    • None
    • New, Patch Available

    Description

      A spinoff from LUCENE-8381. If a soft-deletes docvalues was applied to PendingSoftDeletes already, newDelCount should be less than the softDelCount recorded in SegmentInfo. The attached test trips an assertion in PendingSoftDeletes. I think we need to relax that assertion.

       

      java.lang.AssertionError: softDeleteCount doesn't match 1 != 0
      
      	at __randomizedtesting.SeedInfo.seed([BAC2AFC59AFF8806:167825A6261D33F0]:0)
      	at org.apache.lucene.index.PendingSoftDeletes.onNewReader(PendingSoftDeletes.java:87)
      	at org.apache.lucene.index.ReadersAndUpdates.createNewReaderWithLatestLiveDocs(ReadersAndUpdates.java:651)
      	at org.apache.lucene.index.ReadersAndUpdates.swapNewReaderWithLatestLiveDocs(ReadersAndUpdates.java:663)
      	at org.apache.lucene.index.ReadersAndUpdates.writeFieldUpdates(ReadersAndUpdates.java:619)
      	at org.apache.lucene.index.ReaderPool.writeAllDocValuesUpdates(ReaderPool.java:228)
      	at org.apache.lucene.index.IndexWriter.writeReaderPool(IndexWriter.java:3313)
      	at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:517)
      	at org.apache.lucene.index.StandardDirectoryReader.doOpenFromWriter(StandardDirectoryReader.java:288)
      	at org.apache.lucene.index.StandardDirectoryReader.doOpenIfChanged(StandardDirectoryReader.java:263)
      	at org.apache.lucene.index.StandardDirectoryReader.doOpenIfChanged(StandardDirectoryReader.java:253)
      	at org.apache.lucene.index.DirectoryReader.openIfChanged(DirectoryReader.java:140)
      	at org.apache.lucene.search.SearcherManager.refreshIfNeeded(SearcherManager.java:156)
      	at org.apache.lucene.search.SearcherManager.refreshIfNeeded(SearcherManager.java:58)
      	at org.apache.lucene.search.ReferenceManager.doMaybeRefresh(ReferenceManager.java:176)
      	at org.apache.lucene.search.ReferenceManager.maybeRefreshBlocking(ReferenceManager.java:253)
      	at org.apache.lucene.index.TestSoftDeletesRetentionMergePolicy.testSoftDeleteWithTryUpdateDocValue(TestSoftDeletesRetentionMergePolicy.java:586)
      
      

      Attachments

        1. LUCENE-8384.patch
          5 kB
          Simon Willnauer
        2. LUCENE-8384.patch
          5 kB
          Nhat Nguyen

        Activity

          People

            simonw Simon Willnauer
            dnhatn Nhat Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment