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

fix duplicate compute on maxUnpatchedValue

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 8.8
    • core/codecs
    • None
    • New

    Description

      in [LUCENE-9027|https://github.com/apache/lucene-solr/pull/973] lucene introduced SIMD to decode postings, which leaves a very small problem. i hope i can fix this as my first PR on this amazing project .

      detail:

      maxUnpatchedValue has already computed apache.lucene.codecs.lucene84.PForUtil#encode line 64
      final long maxUnpatchedValue = (1L << patchedBitsRequired) - 1;
      
      apache.lucene.codecs.lucene84.PForUtil#encode line 74
      but computed later again:
      if (longs[i] > (1L << patchedBitsRequired) - 1)...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gf2121 Feng Guo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              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