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

IndexSortSortedNumericDocValuesRangeQuery violates iterator invariant.

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.7
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      In LUCENE-7714 we added a new query to sandbox called IndexSortSortedNumericDocValuesRangeQuery that optimizes range calculations when the field is sorted. The query has a bad bug: its DocIdSetIterator can return an old value for docID() even after advance has returned NO_MORE_DOCS. This violates the DocIdSetIterator contract and means that it's possible for DocIdSetIterator#advance to be called when it's already been exhausted (which can result in invalid reads).

      We would have expected this issue to be caught in tests, especially because classes like AssertingIndexSearcher check for these invariants. As part of this fix I'll look into improvements to the Asserting* wrapper framework.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jtibshirani Julie Tibshirani

              Dates

              • Created:
                Updated:
                Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 0.5h
              0.5h

                Issue deployment