incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregor Martynus <gre...@martynus.net>
Subject _replicator doc conflict issue
Date Sun, 17 Feb 2013 11:54:32 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message