How to check if replication is running

2011-09-16 Thread Yury Kats
Let's say I'm forcing a replication of a core using "fetchindex" command.
No new content is being added to the master.

I can check whether replication has finished by periodically querying
master and slave for their "indexversion" and comparing the two.

But what's the best way to check if replication is actually happening
and hasn't been dropped, if for example, there was a network outage
between master and the slave, in which case, I want to re-start
replication.

Thanks,
Yury



Re: How to check if replication is running

2011-09-16 Thread Brandon Fish
Hi Yury,

You could try checking out the details command of the replication handler:
http://slave_host:port/solr/replication?command=details
which has information such as "isReplicating".

You could also look at the script attached to this issue which shows a
thorough check of a slaves replication status which could be polled for to
trigger a restart if there is an error.

Brandon

2011/9/16 Yury Kats 

> Let's say I'm forcing a replication of a core using "fetchindex" command.
> No new content is being added to the master.
>
> I can check whether replication has finished by periodically querying
> master and slave for their "indexversion" and comparing the two.
>
> But what's the best way to check if replication is actually happening
> and hasn't been dropped, if for example, there was a network outage
> between master and the slave, in which case, I want to re-start
> replication.
>
> Thanks,
> Yury
>
>


Re: How to check if replication is running

2011-09-16 Thread Brandon Fish
Adding missing link to the issue I mentioned:
https://issues.apache.org/jira/browse/SOLR-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851462#action_12851462

2011/9/16 Yury Kats 

> Let's say I'm forcing a replication of a core using "fetchindex" command.
> No new content is being added to the master.
>
> I can check whether replication has finished by periodically querying
> master and slave for their "indexversion" and comparing the two.
>
> But what's the best way to check if replication is actually happening
> and hasn't been dropped, if for example, there was a network outage
> between master and the slave, in which case, I want to re-start
> replication.
>
> Thanks,
> Yury
>
>


Re: How to check if replication is running

2011-09-16 Thread Yury Kats
On 9/16/2011 4:58 PM, Brandon Fish wrote:
> Hi Yury,
> 
> You could try checking out the details command of the replication handler:
> http://slave_host:port/solr/replication?command=details
> which has information such as "isReplicating".

How reliable is isReplicating? Is it updated on unexpected failures or only
during nomral operation? Eg, if both servers were powered down and then up,
would it be false?

> You could also look at the script attached to [1] which shows a
> thorough check of a slaves replication status which could be polled for to
> trigger a restart if there is an error.
> [1] https://issues.apache.org/jira/browse/SOLR-1855

Thanks, that's very helpful. I see that it ultimately checks for 2 hour 
threshhold,
which implies that other means of checking may not be 100% reliable. Is that so?