You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2015/05/31 16:53:17 UTC
[jira] [Updated] (SOLR-7614) Distributed Pivot Facet not thread
safe
[ https://issues.apache.org/jira/browse/SOLR-7614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley updated SOLR-7614:
-------------------------------
Attachment: SOLR-7614.patch
Here's a patch that moves the counter to FacetInfo.
Since a new FacetInfo instance is created for each request, there is no longer a need to reset the counter to 0 in finish().
The concurrency issue was even worse - the counter was set to 0 in finish() even when faceting wasn't enabled.... so any concurrent query requests could mess up pivot facets.
> Distributed Pivot Facet not thread safe
> ---------------------------------------
>
> Key: SOLR-7614
> URL: https://issues.apache.org/jira/browse/SOLR-7614
> Project: Solr
> Issue Type: Bug
> Reporter: Yonik Seeley
> Attachments: SOLR-7614.patch
>
>
> I just happened to notice the following added to FacetComponent:
> {code}
> /**
> * Incremented counter used to track the values being refined in a given request.
> * This counter is used in conjunction with {@link PivotFacet#REFINE_PARAM} to identify
> * which refinement values are associated with which pivots.
> */
> int pivotRefinementCounter = 0;
> {code}
> That counter is incremented for each refinement request for correlation, and then reset to 0 at the end. This will obviously break for concurrent distributed pivot facet requests.
> pivotRefinementCounter should be moved to per-request storage.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org