[ https://issues.apache.org/jira/browse/SOLR-5394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vitaliy Zhovtyuk updated SOLR-5394: ----------------------------------- Attachment: SOLR-5394.patch Attached patch contains 3tests reproducing issues with thread number. There 2 unrelated usages of SimpleFacets.threads with different initialization: - facet.threads - pool size for getting term count per each faces field. Synchrous exectuion if 0. - pool size of org.apache.solr.request.PerSegmentSingleValuedFaceting from local parameters used in query like {!prefix f=bla threads=3 ex=text:bla}signatureField If negative or zero thread number pased, then used MAX_INT as thread number - int threads = nThreads <= 0 ? Integer.MAX_VALUE : nThreads; Default value as -1 could be the issue. About proposed fix i dont see any good reason to keep negative threads number by default. Absolute limit for threads if negative should be -1. I propose to set threads=1 by default meaning single thread execution, if unspecified. If it's requried to get MAX_INT thread pool (with is unlimited threads number) is can be specified in query as -1. > facet.method=fcs seems to be using threads when it shouldn't > ------------------------------------------------------------ > > Key: SOLR-5394 > URL: https://issues.apache.org/jira/browse/SOLR-5394 > Project: Solr > Issue Type: Bug > Affects Versions: 4.6 > Reporter: Michael McCandless > Attachments: SOLR-5394.patch, > SOLR-5394_keep_threads_original_value.patch > > > I built a wikipedia index, with multiple fields for faceting. > When I do facet.method=fcs with facet.field=dateFacet and > facet.field=userNameFacet, and then kill -QUIT the java process, I see a > bunch (46, I think) of facetExecutor-7-thread-N threads had spun up. > But I thought threads for each field is turned off by default? > Even if I add facet.threads=0, it still spins up all the threads. > I think something is wrong in SimpleFacets.parseParams; somehow, that method > returns early (because localParams) is null, leaving threads=-1, and then the > later code that would have set threads to 0 never runs. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org