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

ConcurrentLFUCache throws NoSuchElementException under a write-heavy load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.1
    • 5.2, 6.0
    • None
    • 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
          8 kB
          Shawn Heisey
        2. SOLR-7585.patch
          7 kB
          Shawn Heisey
        3. SOLR-7585.patch
          5 kB
          Shawn Heisey
        4. SOLR-7585.patch
          3 kB
          Maciej Zasada
        5. SOLR-7585.patch
          3 kB
          Maciej Zasada

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: