Let's say I'v a continuous replication, triggered by a doc in the _replicator database:
"db1 => db2"
No I delete db2 and all related replications with concurrent requests.
To remove replications, I made an update function called "stop", that
looks like this:
stop = function(doc, req) {
log('stopping replication ' + doc._id);
doc._deleted = true;
return [doc, 'OK'];
}
problem now is, that I get a conflict due to this error:
Error in replication `1234567890+continuous` (triggered by document `db1 => db2 `): target_db_down
Restarting replication in 5 seconds.
I understand that the document in _replicator db has been updated at the same time after db2
was removed.
Question is: can I prevent the conflict from happening, without using a timeout for dropping
the "db2" database?
Thanks for your help!
--
Gregor
|