couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

Feature Request: manually pause or restart a specific replication job

Open skeyby opened this issue 5 years ago • 1 comments

Current CouchDB 2.x replication scheduler is capable of starting and stopping replication jobs according to various rules, putting paused jobs in "Pending" state.

It would be super cool to be able to set a Replication Job in a "Manually Paused"/"Forced Pending" (read: keep paused until unlocked) or in "Full automatic" (read: the current behaviour) status.

In this way an application logic could keep frozen / low priority replication tasks (say nightly task, unlogged users, offsite replications, whatever) without having the burden of creating/destroying a single-shot replication.

Even if I'm not a developer I suppose the feature could be implemented with just an additional field in the replication document (say "paused"?), and then the rotate_jobs(State, Running, Pending) + pending_jobs function could just "ignore" the documents with "paused" field set as true.

Thanks.

skeyby avatar Nov 06 '18 11:11 skeyby

Something similar might be possible with the new Fair Share replicator algorithm by assigning jobs to different _replicator dbs (low/_replicator, high/_replicator) then adjusting shares accordingly via the the _config/ API.

https://docs.couchdb.org/en/stable/replication/replicator.html#fair-share-job-scheduling

nickva avatar Nov 04 '21 17:11 nickva

As indicated above, Fair Share replicator feature could be used for something like this.

nickva avatar Nov 13 '23 06:11 nickva