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

CaffeineCache puts thread into infinite loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 9.0, 8.11.2
    • None
    • search
    • None

    Description

      Under heavy machine load, accessing any Solr CaffeineCache can lead to threads spinning in an endless loop. In our setup we had machines spinning at 70% cpu load without receiving any request for hours.

      Background

      The problem is caused by delegating the SolrCache#put method to Cache#asMap#put Under heavy machine load with concurrent read and write access to the same key, the ConcurrentHashMap#put method does not terminate an endless loop.

      Implementation

      This problem can be easy be solved by delegating the CaffeineCache#put method to Cache#asMap#compute which uses a producer pattern. After introducing the fix to our environment we were not able to reproduce this error pattern.

      Github Pull Request: https://github.com/apache/solr/pull/1118

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tboeghk Torsten Bøgh Köster
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 11h
                  11h