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 2012/11/07 07:40:43 UTC

Two questions about solrcloud

Hi all,sorry for questions about solrcloud from newbie.
here is my two questions:
1.If I have a solrcloud cluster with two shards and 0 replica on two different server.
 when one of server restarts will the solr instance on that server replay
 the transaction log to make sure these operations persistent to the index files(commit the transaction log)?
 
2.Assuming I have 3 shards cluster with 4 different server,
it will form a cluster with 3 shard and 1 replica. Can I remove one server to reduce
(degrade)the number of servers? if so does I just need to shutdown the server and manually remove it's node from ZK?
 
Regards

SuoNayi

Re: Two questions about solrcloud

Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,

Somebody else may answer 1.
2. Yes you can remove 4th server if you have only 3 shards. I'm not 100%
certain if solr will never put 2 shards on the same server, so check what's
on the server before shutting it down.

Otis
--
Performance Monitoring - http://sematext.com/spm
On Nov 7, 2012 1:41 AM, "SuoNayi" <su...@163.com> wrote:

> Hi all,sorry for questions about solrcloud from newbie.
> here is my two questions:
> 1.If I have a solrcloud cluster with two shards and 0 replica on two
> different server.
>  when one of server restarts will the solr instance on that server replay
>  the transaction log to make sure these operations persistent to the index
> files(commit the transaction log)?
>
> 2.Assuming I have 3 shards cluster with 4 different server,
> it will form a cluster with 3 shard and 1 replica. Can I remove one server
> to reduce
> (degrade)the number of servers? if so does I just need to shutdown the
> server and manually remove it's node from ZK?
>
> Regards
>
> SuoNayi

Re: Two questions about solrcloud

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
A transaction log file is opened after a hard commit and it stays open
until a new hard commit is issued. Old tlogs are deleted, but always with
the premise of keeping enough updates "lines" of tlog to allow peer-sync
(currently, hardcoded to 100 updates). The recovery is made using the last
tlog (docs updated after the last hard commit). See
http://find.searchhub.org/document/29b62a0dcf50ae9e

If you are using tlog you should make sure you do hard commits, otherwise
the tlog grows too much and you will run OOM.

Tomás


On Wed, Nov 7, 2012 at 3:31 PM, Otis Gospodnetic <otis.gospodnetic@gmail.com
> wrote:

> Hi
>
> On Wed, Nov 7, 2012 at 7:49 AM, Tomás Fernández Löbbe <
> tomasflobbe@gmail.com
> > wrote:
>
> > > 1.If I have a solrcloud cluster with two shards and 0 replica on two
> > > different server.
> > >  when one of server restarts will the solr instance on that server
> replay
> > >  the transaction log to make sure these operations persistent to the
> > index
> > > files(commit the transaction log)?
> > >
> >
> > Yes, the Solr instance that was restarted will try to replay it's own
> > transaction log.
>
>
> Tomás,
>
> But how long is data in that xa log kept?  That is, if a server that holds
> the only instance of some shard is up for say a week, and then you restart
> it (server, not Solr), upon startup it will not find the whole week's worth
> of data in the xa log, will it?
>
> Thanks,
> Otis
> --
> Search Analytics - http://sematext.com/search-analytics/index.html
> Performance Monitoring - http://sematext.com/spm/index.html
>
>
>
>
> > >
> > > 2.Assuming I have 3 shards cluster with 4 different server,
> > > it will form a cluster with 3 shard and 1 replica. Can I remove one
> > server
> > > to reduce
> > > (degrade)the number of servers? if so does I just need to shutdown the
> > > server and manually remove it's node from ZK?
> > >
> >
> > You can just remove the server, however, make sure you remove one of the
> > servers where you have a replica (one of the two nodes of shard 1 lets
> > say), because if you shutdown one of the servers holding the shards with
> no
> > extra replicas, the existing nodes will not "rebalance", you'll end up
> with
> > a shard with no nodes (and one shard will continue to have two nodes),
> > which will not allow you to search or index.
> >
> > Tomás
> >
> >
> > > Regards
> > >
> > > SuoNayi
> >
>

Re: Two questions about solrcloud

Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi

On Wed, Nov 7, 2012 at 7:49 AM, Tomás Fernández Löbbe <tomasflobbe@gmail.com
> wrote:

> > 1.If I have a solrcloud cluster with two shards and 0 replica on two
> > different server.
> >  when one of server restarts will the solr instance on that server replay
> >  the transaction log to make sure these operations persistent to the
> index
> > files(commit the transaction log)?
> >
>
> Yes, the Solr instance that was restarted will try to replay it's own
> transaction log.


Tomás,

But how long is data in that xa log kept?  That is, if a server that holds
the only instance of some shard is up for say a week, and then you restart
it (server, not Solr), upon startup it will not find the whole week's worth
of data in the xa log, will it?

Thanks,
Otis
--
Search Analytics - http://sematext.com/search-analytics/index.html
Performance Monitoring - http://sematext.com/spm/index.html




> >
> > 2.Assuming I have 3 shards cluster with 4 different server,
> > it will form a cluster with 3 shard and 1 replica. Can I remove one
> server
> > to reduce
> > (degrade)the number of servers? if so does I just need to shutdown the
> > server and manually remove it's node from ZK?
> >
>
> You can just remove the server, however, make sure you remove one of the
> servers where you have a replica (one of the two nodes of shard 1 lets
> say), because if you shutdown one of the servers holding the shards with no
> extra replicas, the existing nodes will not "rebalance", you'll end up with
> a shard with no nodes (and one shard will continue to have two nodes),
> which will not allow you to search or index.
>
> Tomás
>
>
> > Regards
> >
> > SuoNayi
>

Re: Two questions about solrcloud

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
> 1.If I have a solrcloud cluster with two shards and 0 replica on two
> different server.
>  when one of server restarts will the solr instance on that server replay
>  the transaction log to make sure these operations persistent to the index
> files(commit the transaction log)?
>

Yes, the Solr instance that was restarted will try to replay it's own
transaction log.

>
> 2.Assuming I have 3 shards cluster with 4 different server,
> it will form a cluster with 3 shard and 1 replica. Can I remove one server
> to reduce
> (degrade)the number of servers? if so does I just need to shutdown the
> server and manually remove it's node from ZK?
>

You can just remove the server, however, make sure you remove one of the
servers where you have a replica (one of the two nodes of shard 1 lets
say), because if you shutdown one of the servers holding the shards with no
extra replicas, the existing nodes will not "rebalance", you'll end up with
a shard with no nodes (and one shard will continue to have two nodes),
which will not allow you to search or index.

Tomás


> Regards
>
> SuoNayi