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 andreic9203 <an...@gmail.com> on 2014/10/20 13:06:47 UTC

Solr replicas - stop replication and start again

Hello,

I have a problem which I can't figure out how to solve it.
For a little scenario, I've setup a cluster with two nodes, one shard, and
two replicas, and both nodes connected to an external ZooKeeper.
Great, but now I want to stop replication for an amount of time (or more
precisely, to stop it, and then to start it again).
I need it because, one of my replica will be on a central server and another
one will be on a client server, and in the replica from central server will
be inserted a lot of documents, but before these documents to be replicated,
I want to process them, and after that to start the replication again.

There is a way for doing this?

I thought to something about suspending connection to the clients directly
from the ZooKeeper, if you know something about that, could be probably a
solution.

If you can see another configuration, which could resolve this problem, feel
free to share with us. 

Thanks in advance,
Andrei



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replicas - stop replication and start again

Posted by Ramzi Alqrainy <ra...@gmail.com>.
You can also delete shard also 



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164945.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replicas - stop replication and start again

Posted by andreic9203 <an...@gmail.com>.
Oh, I'll give it a try and then I'll let you know if it works for me or not.

Thank you very much.

Meanwhile, everyone who has an idea are free to share it with us :)



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4165090.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replicas - stop replication and start again

Posted by Michael Della Bitta <mi...@appinions.com>.
Yes, that's what I'm suggesting. It seems a perfect fit for a single shard
collection with an offsite remote that you don't always want to write to.

Michael Della Bitta

Senior Software Engineer

o: +1 646 532 3062

appinions inc.

“The Science of Influence Marketing”

18 East 41st Street

New York, NY 10017

t: @appinions <https://twitter.com/Appinions> | g+:
plus.google.com/appinions
<https://plus.google.com/u/0/b/112002776285509593336/112002776285509593336/posts>
w: appinions.com <http://www.appinions.com/>

On Mon, Oct 20, 2014 at 10:41 AM, andreic9203 <an...@gmail.com> wrote:

> Hello Michael,
>
> Do you want to say, the replication from solr, that with master-slave?
>
> Thank you,
> Andrei
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164965.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr replicas - stop replication and start again

Posted by andreic9203 <an...@gmail.com>.
Hello Michael,

Do you want to say, the replication from solr, that with master-slave?

Thank you,
Andrei



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164965.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replicas - stop replication and start again

Posted by Michael Della Bitta <mi...@appinions.com>.
Andrei,

I'm wondering if you've considered using Classic replication for this use
case. It seems better suited for it.

Michael Della Bitta

Senior Software Engineer

o: +1 646 532 3062

appinions inc.

“The Science of Influence Marketing”

18 East 41st Street

New York, NY 10017

t: @appinions <https://twitter.com/Appinions> | g+:
plus.google.com/appinions
<https://plus.google.com/u/0/b/112002776285509593336/112002776285509593336/posts>
w: appinions.com <http://www.appinions.com/>

On Mon, Oct 20, 2014 at 9:53 AM, andreic9203 <an...@gmail.com> wrote:

> Another idea,
>
> I turned off the replica in which I want to insert data and then to process
> them, I started again, BUT, without -DzkHost, or -DzkRun, so the new
> started
> solr instance. I put my data into it, I stopped again, and I started with
> -DzkHost that points to my zoo keeper.
>
> But the problem is that the ZooKeeper doesn't know about the changes from
> the new replica, and voila, no replication, no nothing.
>
> Any idea?
>
> Thank you,
> Andrei
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164954.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr replicas - stop replication and start again

Posted by andreic9203 <an...@gmail.com>.
Another idea,

I turned off the replica in which I want to insert data and then to process
them, I started again, BUT, without -DzkHost, or -DzkRun, so the new started
solr instance. I put my data into it, I stopped again, and I started with
-DzkHost that points to my zoo keeper.

But the problem is that the ZooKeeper doesn't know about the changes from
the new replica, and voila, no replication, no nothing.

Any idea?

Thank you,
Andrei



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164954.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replicas - stop replication and start again

Posted by andreic9203 <an...@gmail.com>.
Exactly, 

So what good to delete my replica if I can't then to put it back? Is
supposed that this replica contains data, older data, but still updated,
which I need them, so to delete my replica, to create another one, to copy
all documents and then to put the new documents and processing them, seems
to be work in vain...

Stil, thank you for your idea.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164991.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replicas - stop replication and start again

Posted by Ramzi Alqrainy <ra...@gmail.com>.
You can add a new replicas but I think you can't revive the old one.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164988.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replicas - stop replication and start again

Posted by andreic9203 <an...@gmail.com>.
Thank you for your answer,

But, how do you 'revive' the replica after that?

I tried with add replica, but creates another one...(a solr_node3_replica)

Odd solution, but if you solved the problem with reviving the old replica,
it could a viable solution.

Thank you,
Andrei



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164946.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr replicas - stop replication and start again

Posted by Ramzi Alqrainy <ra...@gmail.com>.
You can delete replicas from shard by using this command

/admin/collections?action=DELETEREPLICA&collection=collection&shard=shard&replica=replica

Delete a replica from a given collection and shard. If the corresponding
core is up and running the core is unloaded and the entry is removed from
the clusterstate. If the node/core is down , the entry is taken off the
clusterstate and if the core comes up later it is automatically
unregistered.


<http://lucene.472066.n3.nabble.com/file/n4164943/Screen_Shot_2014-10-20_at_3.png> 

Example : 

http://10.0.1.6:8983/solr/admin/collections?action=DELETEREPLICA&collection=test2&shard=shard2&replica=core_node3



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-replicas-stop-replication-and-start-again-tp4164931p4164943.html
Sent from the Solr - User mailing list archive at Nabble.com.