You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Robert Newson (JIRA)" <ji...@apache.org> on 2010/02/23 04:21:27 UTC
[jira] Created: (COUCHDB-664) Terminate running replication tasks
Terminate running replication tasks
-----------------------------------
Key: COUCHDB-664
URL: https://issues.apache.org/jira/browse/COUCHDB-664
Project: CouchDB
Issue Type: New Feature
Components: Database Core
Affects Versions: 0.11
Reporter: Robert Newson
a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-664) Terminate running replication tasks
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson updated COUCHDB-664:
----------------------------------
Attachment: (was: 0001-add-ability-to-cancel-replication-tasks.patch)
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-664) Terminate running replication tasks
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837116#action_12837116 ]
Jan Lehnardt commented on COUCHDB-664:
--------------------------------------
Two more things:
terminate_child/2 might return an error e.g. if the replication did terminate in the meantime (see http://erldocs.com/R13B03/stdlib/supervisor.html?search=superv&i=1#terminate_child/2). We should handle that gracefully and return a 404.
If we can have a small test (etap or JS is fine by me, etap might be easier), I'd propose this for 0.11.
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-664) Terminate running replication tasks
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson updated COUCHDB-664:
----------------------------------
Attachment: (was: 0001-add-ability-to-cancel-replication-tasks.patch)
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-664) Terminate running replication tasks
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837078#action_12837078 ]
Jan Lehnardt commented on COUCHDB-664:
--------------------------------------
The patch looks good, just a stupid API question: The non-opaque POST body is really nice but what about DELETE /_replicate/<replication-id>?
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-664) Terminate running replication tasks
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837085#action_12837085 ]
Paul Joseph Davis commented on COUCHDB-664:
-------------------------------------------
Would we force the client to know that ID then? Or do we have a good way to query running replication tasks?
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-664) Terminate running replication tasks
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson updated COUCHDB-664:
----------------------------------
Attachment: 0001-add-ability-to-cancel-replication-tasks.patch
Hopefully final patch with added Javascript tests for continuous repl, cancellation success and failure cases.
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-664) Terminate running replication tasks
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837097#action_12837097 ]
Jan Lehnardt commented on COUCHDB-664:
--------------------------------------
How did that happen?
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-664) Terminate running replication tasks
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837087#action_12837087 ]
Jan Lehnardt commented on COUCHDB-664:
--------------------------------------
Yeah I was contemplating that after I commented first. Since the POST to _replicate is blocking, we'd need to make another request to _active_tasks to find the replication ID. eventually, I think we want to have a REST API _jobs API, but for now the proposed patch is quite elegant and sufficient.
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-664) Terminate running replication tasks
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837090#action_12837090 ]
Paul Joseph Davis commented on COUCHDB-664:
-------------------------------------------
I concur on both points.
This just in: Jira is awesome!
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (COUCHDB-664) Terminate running replication tasks
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Lehnardt closed COUCHDB-664.
--------------------------------
Resolution: Fixed
Fix Version/s: 0.11
Applied in trunk at r915664 and 0.11.x at r915665.
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Fix For: 0.11
>
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-664) Terminate running replication tasks
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson updated COUCHDB-664:
----------------------------------
Attachment: 0001-add-ability-to-cancel-replication-tasks.patch
When POST'ing to _replicate, add "cancel":true to kill a currently running job;
curl -X POST http://localhost:5984/_replicate -d '{"source":"db1","target":"db2","continuous":true,"cancel":true}'
The server responds with 200 and the _local_id of the cancelled task.
{"ok":true,"_local_id":"56a810250d6aed082fa4aae1dc58fb6c"}
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-664) Terminate running replication tasks
Posted by "Chris Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879116#action_12879116 ]
Chris Stockton commented on COUCHDB-664:
----------------------------------------
I think this patch is good, but I am not sure it should be required for arguments to match. I.E.
Given a replication command of:
curl -X POST http://localhost:5984/_replicate -d '{"source":"db1","target":"db2","continuous":true,"cancel":false, "create": true}'
-> OK
curl -X POST http://localhost:5984/_replicate -d '{"source":"db1","target":"db2","continuous":true,"cancel":true, "create": true}'
-> OK
curl -X POST http://localhost:5984/_replicate -d '{"source":"db1","target":"db2","continuous":true,"cancel":true, "create": true}'
-> ERROR (create flag was true, instead of false)
curl -X POST http://localhost:5984/_replicate -d '{"source":"db1","target":"db2","continuous":false,"cancel":true, "create": true}'
-> ERROR (continuous flag was false, instead of true, this one is debatable)
In my opinion, the following should be sufficient.
curl -X POST http://localhost:5984/_replicate -d '{"source":"db1","target":"db2","cancel":true}'
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Fix For: 0.11
>
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-664) Terminate running replication tasks
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson updated COUCHDB-664:
----------------------------------
Attachment: 0001-add-ability-to-cancel-replication-tasks.patch
Improved patch that handles attempted cancellation of non-running tasks. etap test to follow.
> Terminate running replication tasks
> -----------------------------------
>
> Key: COUCHDB-664
> URL: https://issues.apache.org/jira/browse/COUCHDB-664
> Project: CouchDB
> Issue Type: New Feature
> Components: Database Core
> Affects Versions: 0.11
> Reporter: Robert Newson
> Attachments: 0001-add-ability-to-cancel-replication-tasks.patch
>
>
> a patch to kill running replication tasks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.