[
https://issues.apache.org/jira/browse/SOLR-13350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17847965#comment-17847965
]
Ishan Chattopadhyaya commented on SOLR-13350:
---------------------------------------------
bq. This is caused by breaking the end-to-end tracking of request context in
SolrRequestInfo, which uses a thread-local deque to provide the same context
for both the main and all sub-requests. This tracking is needed to setup the
correct query timeout instance on the searcher ( QueryLimits ) for time-limited
searches in the SolrIndexSearcher:727 . However, now that this method is
executed in a separate "searcherCollector" thread the SolrRequestInfo instance
it obtains is empty because it doesn't match the original thread that set it.
QueryLimits has two parts: timeAllowed and cpuThreadLimits.
# For timeAllowed, I can see that this value is passed to the searcher
https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java#L726-L735.
Hence, I think timeAllowed will be honoured by Lucene properly.
# For cpuThreadLimits, the limits are set in SolrRequestInfo
(https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/request/SolrRequestInfo.java#L86-L87).
Seems like they are not getting carried over to the sub-threads. Noble Paul
pointed me to the InheritableThreadLocalProvider for this.
As of now, the timeAllowed requests are anyway executed without multithreading:
https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/search/MultiThreadedSearcher.java#L125
I'm considering adding the cpuThreadLimits based requests also to this
exception list.
> Explore collector managers for multi-threaded search
> ----------------------------------------------------
>
> Key: SOLR-13350
> URL: https://issues.apache.org/jira/browse/SOLR-13350
> Project: Solr
> Issue Type: New Feature
> Reporter: Ishan Chattopadhyaya
> Assignee: Ishan Chattopadhyaya
> Priority: Major
> Attachments: SOLR-13350.patch, SOLR-13350.patch, SOLR-13350.patch
>
> Time Spent: 11.5h
> Remaining Estimate: 0h
>
> AFAICT, SolrIndexSearcher can be used only to search all the segments of an
> index in series. However, using CollectorManagers, segments can be searched
> concurrently and result in reduced latency. Opening this issue to explore the
> effectiveness of using CollectorManagers in SolrIndexSearcher from latency
> and throughput perspective.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]