[ https://issues.apache.org/jira/browse/COUCHDB-3326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16495633#comment-16495633 ]
ASF subversion and git services commented on COUCHDB-3326: ---------------------------------------------------------- Commit d1d9d268dd5bbbff1ed9a4a4ee04631a08e70f4a in couchdb's branch refs/heads/COUCHDB-3326-clustered-purge-pr5-implementation from [~paul.joseph.davis] [ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=d1d9d26 ] [07/N] Clustered Purge: Internal replication This commit implements the internal replication of purge requests. This part of the anit-entropy process is important for ensuring that shard copies continue to be eventually consistent even if updates happen to shards independently due to a network split or other event that prevents the successful purge request to a given copy. The main addition to internal replication is that we both pull and push purge requests between the source and target shards. The push direction is obvious given that internal replication is in the push direction already. Pull isn't quite as obvious but is required so that we don't push an update that was already purged on the target. Of note is that internal replication also has to maintain _local doc checkpoints to prevent compaction removing old purge requests or else shard copies could end up missing purge requests which would prevent the shard copies from ever reaching a consistent state. COUCHDB-3326 Co-authored-by: Mayya Sharipova <may...@ca.ibm.com> Co-authored-by: jiangphcn <jian...@cn.ibm.com> > 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:pass@127.0.0.1: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)