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 19:18:00 UTC
[jira] [Comment Edited] (SOLR-16489) CaffeineCache puts thread into infinite loop
[ https://issues.apache.org/jira/browse/SOLR-16489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623352#comment-17623352 ]
Torsten Bøgh Köster edited comment on SOLR-16489 at 10/24/22 7:17 PM:
----------------------------------------------------------------------
The issue occurred in the filterCache and the config was pretty standard. We added the fix from the issue as a {{NoPutCaffeineCache implementation:}}
{{ }}
{{<filterCache}}
{{{{ class="org.apache.solr.search.NoPutCaffeineCache"}}}}
{{{{ size="1024"}}}}
{{{{ initialSize="1024"}}}}
{{{{ autowarmCount="0" />}}}}
was (Author: tboeghk):
The issue occurred in the filterCache and the config was pretty standard. We added the fix from the issue as a {{NoPutCaffeineCache implementation:}}
{{<filterCache }}
{{ class="org.apache.solr.search.NoPutCaffeineCache"}}
{{ size="1024"}}
{{ initialSize="1024"}}
{{ autowarmCount="0" />}}
> 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
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> 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