[ 
https://issues.apache.org/jira/browse/COUCHDB-3326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16402410#comment-16402410
 ] 

ASF subversion and git services commented on COUCHDB-3326:
----------------------------------------------------------

Commit 0f44181de0cb729883c11326da284cf687e3a70e in couchdb's branch 
refs/heads/COUCHDB-3326-clustered-purge-davisp-refactor from [~mayyas]
[ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=0f44181 ]

Add internal replication of purge requests

* Add initial pull replication of purge requests
 - Each internal replication job starts by pulling purge requests from
    target and applying them on source.  If a source and target were
    disconnected during a purge request, it's possible that the target
    has received a purge request not yet present on the source. Given
    that internal replication is push oriented it would be possible for the
    source and target to reconnect and have the source push a revision that
    has since been purged. To avoid this we should pull purge requests
    from the target to ensure we're up to date before beginning internal
    replication.
 - Add _local/purge-mem3-$hash docs in mem3_rep. mem3 writes a
    _local/purge-mem3-$hash document once purge requests have been
    replicated. This document will exist on the target and the
    purge_seq value will be the target's purge_seq that has been processed
    during *pull* replication.

* Add push replication of purge requests
 - Push new purge requests from source to target, and apply them on
   target
 - Update checkpoint docs to store the purge_seq on source

COUCHDB-3326


> Implement clustered purge API: _purge
> -------------------------------------
>
>                 Key: COUCHDB-3326
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3326
>             Project: CouchDB
>          Issue Type: New Feature
>          Components: Database Core, Documentation, HTTP Interface
>            Reporter: Mayya Sharipova
>            Priority: Major
>
> This implements the clustered purge API:
> {code:}
> curl -H 'Content-Type: application/json' -X POST 
> "http://adm:[email protected]:5984/test1/_purge"; -d 
> '{"d1":["3-410e46c04b51b4c3304ed232790a49da", 
> "3-420e46c04b51b4c3304ed232790a35db"],"d2":["2-a39d6d63f29a956ae39930f84dd71ec3"],
>  "d3":["1-bdca7a3ac9503bf6e46d7d7a782e8f03"]}'
> {code}
> Response: status_code 201 or 202
> {code:javascript}
> {
>   "purged": [
>     {
>       "ok": true,             //Quorum was reached, at least W nodes 
> successfully purged doc
>       "id": "d1",
>       "revs": [
>         "3-410e46c04b51b4c3304ed232790a49da",
>        "3-420e46c04b51b4c3304ed232790a35db"
>       ]
>     },
>     {
>       "accepted": true,      //Quorum was NOT reached, but request was 
> accepted
>       "id": "d2",   
>       "revs": [
>         "2-a39d6d63f29a956ae39930f84dd71ec3"
>       ]
>     },
>     {
>       "ok": true,   
>       "id": "d3",
>       "revs": []            //(DocId or Revs missing) OR (Revs are not leaf 
> revisions) 
>     }  ],
>   "purge_seq": 
> "6-g1AAAABMeJzLYWBgYMpgTmHgz8tPSTV2MDQy1zMAQsMckEQiQ5L8____sxKZ4UoMcSrJAgC9PRRl"
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to