Shalin's right, I was hurried in my response and forgot that the
min_rf just _allows_ the client to figure out that the update didn't
get updated on enough replicas and the client has to "do the right
thing" with that information, thanks Shalin!

Right, your scenario is correct. When the follower goes back to
"active" and starts serving queries it will be all caught up with the
leader, including any missed documents.

Your step 4, the client gets a success response since the document was
indexed successfully on the leader. There's some additional
information in the response saying min_rf wasn't met and you should do
whatever you think appropriate. Stop indexing, retry, send a message
to your sysadmin, etc.

You can figure out exactly what by a pretty simple experiment, just
take one replica of a two-replica system down and specify min_rf of
2.....

Best,
Erick

On Wed, May 2, 2018 at 9:20 PM, Greenhorn Techie
<greenhorntec...@gmail.com> wrote:
> Shalin,
>
> Given the earlier response by Erick, wondering when this scenario occurs
> i.e. when the replica node recovers after a time period, wouldn’t it
> automatically recover all the missed updates by connecting to the leader?
> My understanding is the below from the responses so far (assuming
> replication factor of 2 for simplicity purposes):
>
> 1. Client tries an update request which is received by the shard leader
> 2. Leader once it updates on its own node, send the update to the
> unavailable replica node
> 3. Leader keeps trying to send the update to the replica node
> 4. After a while leader gives up and communicates to the client (not sure
> what kind of message will the client receive in this case?)
> 5. Replica node recovers and then realises that it needs to catch-up and
> hence receives all the updates in recovery mode
>
> Correct me if I am wrong in my understanding.
>
> Thnx!!
>
>
> On 3 May 2018 at 04:10:12, Shalin Shekhar Mangar (shalinman...@gmail.com)
> wrote:
>
> The min_rf parameter does not fail indexing. It only tells you how many
> replicas received the live update. So if the value is less than what you
> wanted then it is up to you to retry the update later.
>
> On Wed, May 2, 2018 at 3:33 PM, Greenhorn Techie <greenhorntec...@gmail.com>
>
> wrote:
>
>> Hi,
>>
>> Good Morning!!
>>
>> In the case of a SolrCloud setup with sharing and replication in place,
>> when a document is sent for indexing, what happens when only the shard
>> leader has indexed the document, but the replicas failed, for whatever
>> reason. Will the document be resent by the leader to the replica shards
> to
>> index the document after sometime or how is scenario addressed?
>>
>> Also, given the above context, when I set the value of min_rf parameter
> to
>> say 2, does that mean the calling application will be informed that the
>> indexing failed?
>>
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.

Reply via email to