[ 
https://issues.apache.org/jira/browse/SOLR-6832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14337817#comment-14337817
 ] 

Otis Gospodnetic commented on SOLR-6832:
----------------------------------------

Hmmmm.... didn't examine the patch or tried this functionality, but based on 
your description... here are some comments.

bq. This helps only where there is over-sharding.

That in itself should be avoided whenever possible in my experience. Overhead 
around memory and communication during querying.  Could be related to your 
deadlocks.  Or maybe you do a ton more writes so distributing writes across all 
nodes is worth the query-time overhead of over-sharding?

bq. Since all queries were send to other nodes, we were getting hit with 
distributed deadlocks more often when one or more nodes were slow/overloaded.

Hmmmm... if that is truly happening, then isn't that a separate issue to be 
fixed?

bq. So this patch is a slight optimization and a reduction of likelihood of 
getting bogged down by other slow nodes when the parent query node has the core.

But VERY slight, right? (hence my Q about whether you've quantified the 
improvement from this patch)

Intuitively, querying the local data makes sense - why would one not do that if 
the data is right there.  I just wonder how much you really benefit if you are 
saving just 1 (or very small) number of network calls in request that ends up 
dispatching NN requests to NN other nodes in the cluster.

> Queries be served locally rather than being forwarded to another replica
> ------------------------------------------------------------------------
>
>                 Key: SOLR-6832
>                 URL: https://issues.apache.org/jira/browse/SOLR-6832
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.10.2
>            Reporter: Sachin Goyal
>            Assignee: Timothy Potter
>             Fix For: Trunk, 5.1
>
>         Attachments: SOLR-6832.patch, SOLR-6832.patch, SOLR-6832.patch, 
> SOLR-6832.patch
>
>
> Currently, I see that code flow for a query in SolrCloud is as follows:
> For distributed query:
> SolrCore -> SearchHandler.handleRequestBody() -> HttpShardHandler.submit()
> For non-distributed query:
> SolrCore -> SearchHandler.handleRequestBody() -> QueryComponent.process()
> \\
> \\
> \\
> For a distributed query, the request is always sent to all the shards even if 
> the originating SolrCore (handling the original distributed query) is a 
> replica of one of the shards.
> If the original Solr-Core can check itself before sending http requests for 
> any shard, we can probably save some network hopping and gain some 
> performance.
> \\
> \\
> We can change SearchHandler.handleRequestBody() or HttpShardHandler.submit() 
> to fix this behavior (most likely the former and not the latter).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to