You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Olivia Crusoe <oc...@rei.com> on 2022/04/08 17:08:07 UTC

Verifying the replica.type parameter behavior

Hello,

I've been trying out the shards.preference=replica.type:PULL  as a parameter appended onto queries, as well as trying out including it in the search request handler. For context, we have a collection that is 2 shards, 2 TLOGs per shard, and n number of PULLs (can change depending on if we wish to add more replicas during higher periods of traffic). This is being tested in Solr 8.8.2.

In an effort to verify that the queries were being handled by only the PULL replicas, I've been looking at our Solr request logs, expecting to see only pull replica types handling our queries. Yet, I am seeing a number of "replica": "x:collectionname_shardx_replica_tx" included in the request logs, which seems to insinuate that the TLOG replicas are still serving queries.

I have two questions: 1.) am I right in assuming that setting the replica.type should be exclusively sending requests to PULL replicas? 2.) If that is true, why would I still be seeing TLOG types on the Solr request logs? Is there some type of routing done behind-the-scenes that is not visible in the request logs?

Thank you in advance for any guidance you can provide.

[cid:image001.png@01D84B2C.876A3B40]
Olivia Crusoe
Software Engineer Lead - Search


Re: Verifying the replica.type parameter behavior

Posted by Michael Gibney <mi...@michaelgibney.net>.
`shards.preference` only affects the backend routing of requests to
individual cores/shards. These backend requests should have an additional
`distrib=false` param, and are the requests that are generally the most
resource-intensive, in that they do the initial per-shard domain-narrowing.

I'm fairly certain that "top-level" requests are logged as being associated
with some arbitrary shard (of the associated collection) on whatever node
the external request happens to hit. I suspect that the requests you're
seeing that appear to be associated with an unexpected shard are top-level
requests (without a `distrib=false` param). If so, then `shards.preference`
is likely working as intended. I'm curious whether you're able to confirm
that all `distrib=false` requests are all indeed associated with PULL
replicas?

On Fri, Apr 8, 2022 at 2:22 PM Olivia Crusoe <oc...@rei.com> wrote:

> Hello,
>
>
>
> I’ve been trying out the shards.preference=replica.type:PULL  as a
> parameter appended onto queries, as well as trying out including it in the
> search request handler. For context, we have a collection that is 2 shards,
> 2 TLOGs per shard, and n number of PULLs (can change depending on if we
> wish to add more replicas during higher periods of traffic). This is being
> tested in Solr 8.8.2.
>
>
>
> In an effort to verify that the queries were being handled by only the
> PULL replicas, I’ve been looking at our Solr request logs, expecting to see
> only pull replica types handling our queries. Yet, I am seeing a number of *"replica":
> "x:collectionname_shardx_replica_tx"* included in the request logs, which
> seems to insinuate that the TLOG replicas are still serving queries.
>
>
>
> I have two questions: 1.) am I right in assuming that setting the
> replica.type should be exclusively sending requests to PULL replicas? 2.)
> If that is true, why would I still be seeing TLOG types on the Solr request
> logs? Is there some type of routing done behind-the-scenes that is not
> visible in the request logs?
>
>
>
> Thank you in advance for any guidance you can provide.
>
>
>
> Olivia Crusoe
>
> Software Engineer Lead – Search
>
>
>