You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by SuoNayi <su...@163.com> on 2013/04/15 17:58:33 UTC
3 general questions about SolrCloud
Dear list,
Sorry for these general questions and I'm really be mess now.
1. What's the model between the master and replicas in one shard?
If the replicas are able to catch up with the master when the master
receives a update request it will scatter the request to all the active
replicas and expect responses before the request get executed
by itself.This is called push model,right?
When a new replica is present it will download the whole index from
the master can this be called pull model?but when the master pushes
updates to it how the replica behaves,continuing to download the whole
index while keeping a track of the updates in a log(tlog) ?
2.What's the main use of the transaction log?
Is it only used to serve the NRT get requests and not related with data sync
between the master and replica?
3.Will the leader election be related with index version?
If a shard has 3 replicas and when the master goes down how to choose the master,
do they compare the lastest index version for each one or only consider the earliest presence time?
Regards&Thanks
Re:Re: 3 general questions about SolrCloud
Posted by SuoNayi <su...@163.com>.
Thanks for clarification and I think I did make it clear.
At 2013-04-16 01:59:59,"Shawn Heisey" <so...@elyograg.org> wrote:
>On 4/15/2013 9:58 AM, SuoNayi wrote:
>> 1. What's the model between the master and replicas in one shard?
>> If the replicas are able to catch up with the master when the master
>> receives a update request it will scatter the request to all the active
>> replicas and expect responses before the request get executed
>> by itself.This is called push model,right?
>> When a new replica is present it will download the whole index from
>> the master can this be called pull model?but when the master pushes
>> updates to it how the replica behaves,continuing to download the whole
>> index while keeping a track of the updates in a log(tlog) ?
>
>There is no master. SolrCloud is fully distributed. One replica on
>each shard is elected leader, but that is not a permanent designation.
>
>> 2.What's the main use of the transaction log?
>> Is it only used to serve the NRT get requests and not related with data sync
>> between the master and replica?
>
>The transaction log is used to replay transactions when a node starts
>up. If the differences between the leader replica and a replica that
>just started are small enough, the transaction log will be used to bring
>them back into sync. If they are too different, the one that just
>started will replicate the full index from the leader. I am pretty sure
>that the _version_ field present on every document is used to determine
>whether replicas are in sync, not the index version.
>
>> 3.Will the leader election be related with index version?
>> If a shard has 3 replicas and when the master goes down how to choose the master,
>> do they compare the lastest index version for each one or only consider the earliest presence time?
>
>Here is my understanding about leader elections, I hope it's right!
>Leader elections only take place when the leader goes down. Once a
>replica is elected leader, it will remain leader unless it goes down.
>The other replicas can go up and down and the leader will retain that
>role. I do not think the index version is used at all, the _version_
>field in the index is probably used instead.
>
>Thanks,
>Shawn
>
Re: 3 general questions about SolrCloud
Posted by Shawn Heisey <so...@elyograg.org>.
On 4/15/2013 9:58 AM, SuoNayi wrote:
> 1. What's the model between the master and replicas in one shard?
> If the replicas are able to catch up with the master when the master
> receives a update request it will scatter the request to all the active
> replicas and expect responses before the request get executed
> by itself.This is called push model,right?
> When a new replica is present it will download the whole index from
> the master can this be called pull model?but when the master pushes
> updates to it how the replica behaves,continuing to download the whole
> index while keeping a track of the updates in a log(tlog) ?
There is no master. SolrCloud is fully distributed. One replica on
each shard is elected leader, but that is not a permanent designation.
> 2.What's the main use of the transaction log?
> Is it only used to serve the NRT get requests and not related with data sync
> between the master and replica?
The transaction log is used to replay transactions when a node starts
up. If the differences between the leader replica and a replica that
just started are small enough, the transaction log will be used to bring
them back into sync. If they are too different, the one that just
started will replicate the full index from the leader. I am pretty sure
that the _version_ field present on every document is used to determine
whether replicas are in sync, not the index version.
> 3.Will the leader election be related with index version?
> If a shard has 3 replicas and when the master goes down how to choose the master,
> do they compare the lastest index version for each one or only consider the earliest presence time?
Here is my understanding about leader elections, I hope it's right!
Leader elections only take place when the leader goes down. Once a
replica is elected leader, it will remain leader unless it goes down.
The other replicas can go up and down and the leader will retain that
role. I do not think the index version is used at all, the _version_
field in the index is probably used instead.
Thanks,
Shawn