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

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

bq. The performance gain increases if coresPerMachine is > 1 and a single JVM 
has cores from 'k' shards.

Ever managed to measure how much this feature helps in various scenarios?

bq. 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.

This sounds as like it saves only a N local calls out of M, where M > N, N is 
the number of local replicas that could be queried locally, and M is the total 
number of primary shards in the cluster that are to be queries.  Is this 
correct?

So say there are 20 shards spread evenly over 20 nodes (i.e., 1 shard per node) 
and a query request comes in, the node that got the request will query send 19 
requests to the remaining 19 nodes and thus save just one network trip by 
querying a local shard?  I must be missing something...

> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to