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

Java 8: ConcurrentLinkedHashMap -> Caffeine

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: None
    • Labels:
      None

      Description

      When Solr transitions to requiring Java 8, please upgrade to Caffeine. The performance should be relatively the same. The per-instance memory usage should be smaller and Solr may decide to opt-in to use some of the additional features. The only drawback is that the jar size is larger due to code generation, though that may be trimmed over time and usually is not a concern for server-side applications.

      ConcurrentLinkedHashMap changes will continue to be minimal, even more so now, and driven by requests from Java 6 users unable to upgrade. Caffeine is ideally the upgrade path for Guava cache users too, which due to Android cannot be significantly modified.

      Caffeine: https://github.com/ben-manes/caffeine
      Benchmarks: https://github.com/ben-manes/caffeine/wiki/Benchmarks
      ConcurrentLinkedHashMap: https://code.google.com/p/concurrentlinkedhashmap

        Attachments

        1. SOLR-7355.patch
          33 kB
          Shawn Heisey
        2. SOLR-7355.patch
          8 kB
          Shawn Heisey
        3. SOLR-7355.patch
          20 kB
          Shawn Heisey
        4. SOLR-7355.patch
          32 kB
          Ben Manes

          Issue Links

            Activity

              People

              • Assignee:
                elyograg Shawn Heisey
                Reporter:
                ben.manes Ben Manes
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: