[
https://issues.apache.org/jira/browse/SOLR-17172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140532#comment-18140532
]
Abhishek Umarjikar commented on SOLR-17172:
-------------------------------------------
[~dsmiley] [~ab]
So, If setting timealloed or cpuallowed or memallowed will not use async cache
at all? Will it cause cpu spikes?
ComputeIfAbsent uses async cache based on the flag, so if i set filter cache to
async =true and set autowarm to 0, will it cause problem in performance?
>From official doc:
The filter cache is a good candidate for enabling {{async}} computation.
<filterCache class="solr.CaffeineCache"
size="1024"
autowarmCount="0"
async="true"/>
{code:java}
DocSet answer;
QueryLimits queryLimits = QueryLimits.getCurrentLimits();
if (queryLimits.isLimitsEnabled()) {
// If there is a possibility of timeout for this query, then don't reserve a
computation slot.
// Further, we can't naively wait for an in progress computation to finish,
because if we time
// out before it does then we won't even have partial results to provide. We
could possibly
// wait for the query to finish in parallel with our own results and if they
complete first
// use that instead, but we'll leave that to implement later.
answer = filterCache.get(query);
// Not found in the cache so compute and put in the cache
if (answer == null) {
answer = getDocSetNC(query, null);
filterCache.put(query, answer);
}
} else {
answer = filterCache.computeIfAbsent(query, q -> getDocSetNC(q, null));
}
{code}
> Add QueryLimits termination to existing heavy SearchComponent-s
> ---------------------------------------------------------------
>
> Key: SOLR-17172
> URL: https://issues.apache.org/jira/browse/SOLR-17172
> Project: Solr
> Issue Type: Sub-task
> Components: Query Limits
> Reporter: Andrzej Bialecki
> Assignee: Andrzej Bialecki
> Priority: Major
> Fix For: 9.6
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> The purpose of this ticket is to review the existing {{SearchComponent}}-s
> that perform intensive tasks to see if they could be modified to check the
> {{QueryLimits.shouldExit()}} inside their execution.
> This is not meant to be included in tight loops but to prevent individual
> components from completing multiple stages of costly work that will be
> discarded anyway on the exit from the component due to the exceeded limits
> (SOLR-17151).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]