[
https://issues.apache.org/jira/browse/SOLR-8657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15142641#comment-15142641
]
Pascal Chollet commented on SOLR-8657:
--------------------------------------
We are doing manual commit requests, and not auto-commits. Maybe this makes a
difference.
In {{SolrCore.getSearcher(...)}} there is
{code}
if (currSearcher != null) {
future = searcherExecutor.submit(new Callable() {
@Override
public Object call() throws Exception {
try {
for (SolrEventListener listener : newSearcherListeners) {
listener.newSearcher(newSearcher, currSearcher);
}
} catch (Throwable e) {
SolrException.log(log, null, e);
if (e instanceof Error) {
throw (Error) e;
}
}
return null;
}
});
}
{code} which calls {{MDCAwareThreadPoolExecutor.execute()}}.
And in {{MDCAwareThreadPoolExecutor.execute()}} there is {code}for (int i = 0;
i < providersCopy.size(); i++) providersCopy.get(i).set(ctx.get(i));{code} with
{{SolrRequestInfo.getInheritableThreadLocalProvider()}} being contained in
providersCopy. So this is setting SolrRequestInfo the first time.
Then within the same thread {{QuerySenderListener.newSearcher()}} is called,
which sets SolrRequestInfo the second time.
> SolrRequestInfo logs an error if QuerySenderListener is being used
> ------------------------------------------------------------------
>
> Key: SOLR-8657
> URL: https://issues.apache.org/jira/browse/SOLR-8657
> Project: Solr
> Issue Type: Bug
> Affects Versions: 5.4.1
> Reporter: Pascal Chollet
> Attachments: Screen Shot 2016-02-10 at 09.43.56.png
>
>
> This is the stack trace:
> {code}
> at
> org.apache.solr.request.SolrRequestInfo.setRequestInfo(SolrRequestInfo.java:59)
> at
> org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:68)
> at org.apache.solr.core.SolrCore$6.call(SolrCore.java:1859)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:232)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> SolrRequestInfo is being set in MDCAwareThreadPoolExecutor.execute() and
> later in QuerySenderListener.newSearcher() in the same thread.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]