Lucene - Core
  1. Lucene - Core
  2. LUCENE-3711

small SentinelIntSet can cause infinite loop on resize

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      A small initial size of <=4 can cause the set to not rehash soon enough and thus go into an infinite loop searching the table for an open space.

        Activity

        Hide
        Yonik Seeley added a comment -

        Martijn brought this to my attention, and I committed a fix + test to trunk.
        But via IRC:

        [16:46] <yonik_> mvg: is there anything in a released version of Lucene/Solr that uses SentinelIntSet in a way that causes it to resize?
        [16:47] <yonik_> if not, no CHANGES entry needed...
        [16:48] <mvg> Yes in the TermAllGroupsCollector and in some impl of TermAllGroupHeadsCollector
        [16:49] <mvg> Both collectors can take an initial size.
        [16:49] <mvg> The SentinelIntSet can grow in these collectors.

        The default on those collectors is 128, so most likely no one was bit (i.e. they would need to override that default), but we should add a CHANGES entry and backport to 3x.

        Show
        Yonik Seeley added a comment - Martijn brought this to my attention, and I committed a fix + test to trunk. But via IRC: [16:46] <yonik_> mvg: is there anything in a released version of Lucene/Solr that uses SentinelIntSet in a way that causes it to resize? [16:47] <yonik_> if not, no CHANGES entry needed... [16:48] <mvg> Yes in the TermAllGroupsCollector and in some impl of TermAllGroupHeadsCollector [16:49] <mvg> Both collectors can take an initial size. [16:49] <mvg> The SentinelIntSet can grow in these collectors. The default on those collectors is 128, so most likely no one was bit (i.e. they would need to override that default), but we should add a CHANGES entry and backport to 3x.

          People

          • Assignee:
            Unassigned
            Reporter:
            Yonik Seeley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development