You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Torsten Bøgh Köster (Jira)" <ji...@apache.org> on 2022/10/24 15:55:00 UTC
[jira] [Updated] (SOLR-16489) CaffeineCache puts thread into infinite loop
[ https://issues.apache.org/jira/browse/SOLR-16489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Torsten Bøgh Köster updated SOLR-16489:
---------------------------------------
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
was:
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.
> 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: 9.0, 8.11.2
> Reporter: Torsten Bøgh Köster
> Priority: Major
>
> 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
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org