Torsten Bøgh Köster created SOLR-16489:
------------------------------------------
Summary: CaffeineCache puts thread into infinite loop
Key: SOLR-16489
URL: https://issues.apache.org/jira/browse/SOLR-16489
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Components: search
Affects Versions: 8.11.2, 9.0
Reporter: Torsten Bøgh Köster
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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]