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

Assert that ForUtil.BLOCK_SIZE can be encoded in a single byte in PForUtil

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 9.0
    • 9.0
    • core/codecs
    • None
    • New

    Description

      PForUtil assumes that ForUtil.BLOCK_SIZE can be encoded in a single byte when generating "patch offsets". If this assumption doesn't hold, PForUtil will silently encode incorrect positions. While the BLOCK_SIZE isn't particularly configurable, it would be nice to assert this assumption early in PForUtil in the even that the BLOCK_SIZE changes in some future codec version.

      Attachments

        1. LUCENE-9822.patch
          0.6 kB
          Greg Miller

        Activity

          People

            Unassigned Unassigned
            gsmiller Greg Miller
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: