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

ConcurrentLFUCache throws NoSuchElementException under a write-heavy load

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 5.2, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Under a write-heavy load ConcurrentLFUCache throws NoSuchElementException. The problem lies within org.apache.solr.util.ConcurrentLFUCache#put method, which allows for a race condition between the check and the call to markAndSweep method. Despite that a thread must acquire a lock to perform sweeping, it's still possible that multiple threads successfully detected a need for calling markAndSweep. If they execute it sequentially, subsequent runs will fail with NoSuchElementException.

        Attachments

        1. SOLR-7585.patch
          3 kB
          Maciej Zasada
        2. SOLR-7585.patch
          3 kB
          Maciej Zasada
        3. SOLR-7585.patch
          5 kB
          Shawn Heisey
        4. SOLR-7585.patch
          7 kB
          Shawn Heisey
        5. SOLR-7585.patch
          8 kB
          Shawn Heisey

          Activity

            People

            • Assignee:
              elyograg Shawn Heisey
              Reporter:
              maciej.zasada Maciej Zasada
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: