Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-17190

Replace org.apache.solr.util.LongSet with hppc LongHashSet

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

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • main (10.0), 9.5.0
    • 9.6
    • None
    • None

    Description

      The functionality provided by org.apache.solr.util.LongSet is redundant to that provided by com.carrotsearch.hppc.LongHashSet. Since hppc is already a dependency of solr-core, we should replace usages of org.apache.solr.util.LongSet and remove/deprecate it.

      The motivation for this is practical as well: the hash function used by org.apache.solr.util.LongSet is quite suboptimal for certain common usage patterns (specifically, if the values stored vary by powers of two (the larger the worse), values end up disproportionately hashing to the same bucket and you basically have an array scan for get and put).

      This issue proposes to replace usages on main and branch_9x, remove org.apache.solr.util.LongSet on main, and either remove it or deprecate it on branch_9x.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            magibney Michael Gibney
            magibney Michael Gibney
            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 - 40m
                40m

                Slack

                  Issue deployment