couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <randall.le...@gmail.com>
Subject Re: Cancelling a replication on 0.11.0
Date Thu, 25 Mar 2010 05:42:28 GMT
On Wed, Mar 24, 2010 at 22:01, Jan Lehnardt <jan@apache.org> wrote:
>
> On 24 Mar 2010, at 17:20, Germain Maurice wrote:
>
>> Hi, still me with my 0.11.0 couchdb :)
>>
>> I launched continuous replication between two hosts (more than 8 millions of documents),
it takes long time and i'm ok with that.
>> My problem is that i launched another one shot replication between the same databases
as the previous replication.
>>
>> So, i looked after a command to cancel the "one shot" replication (via Jira COUCHDB-664),
but it does not work, my command is :
>>
>> curl -X POST http://hostA:5984/_replicate -d '{"source":"database","target":"http://hostB:5984/database/","cancel":true}'
>>
>> Response is : {"error":"not_found"}
>
> Sorry to point out the obvious, but can you double check, that the -d {}-object values
are identical to the ones in the replication you want to cancel?
>
>> How to cancel the task ? I have PID number from the "Status" page on Futon, how to
use it ?
>
> killing with the pid is a bit tricky and requires Erlang-fu. I've spent 15 minutes earlier
today to kill a long running view process and got stuck and then run out of time. That said,
with distributed Erlang and the rpc module, this should be doable.

First you have to start erlang in distributed mode, which couch does
not do by default. ERL_FLAGS="-name couch -setcookie secret" should do
the trick. Then you can connect to the node with "erl -name repkiller
-setcookie secret -remsh couch@fqdn.of.couch.node". Starting up appmon
with appmon:start() should give you a nice graphical way to browse the
supervisor tree and make it easy to identify the replication.

But if you didn't already modify couch to start with a distributed
erlang name and cookie you're stuck and you'll have to restart couchdb
anyway. Could be useful in the future if you want to kill anything.
Murderer.

Mime
View raw message