[
https://issues.apache.org/jira/browse/COUCHDB-3326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16535152#comment-16535152
]
ASF subversion and git services commented on COUCHDB-3326:
----------------------------------------------------------
Commit 167e1a0bef515361c327551324aa617cb0adc86f in couchdb's branch
refs/heads/COUCHDB-3326-clustered-purge-pr5-implementation from Paul J. Davis
[ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=167e1a0 ]
[01/10] Clustered Purge: Define new purge API
This is the first of a series of commits to implement the new clustered
purge API. Currently purge is a single-node only API that allows for
removing document revisions (and by extension entire documents)
completely from a database. However, given our anti-entropy measures
this API is extremely difficult to use in a cluster and requires
significant operator intervention.
Along with the operator intervention, this API is inherently unsafe with
regards to accidentally triggering the rebuild of secondary indices. As
such this patch set is aimed at creating a cluster aware API that is
both easier to use and less likely to cause application downtime while
secondary indices are rebuilt.
There are four major areas that will be covered by this patch set:
1. Single node APIs and behavior changes
2. Cluster aware APIs
3. Anti-entropy updates
4. Cluster HTTP implementation
This patch set is split up into a series of commits to aid in the review
by other commiters that will hopefully allow for a logical and intuitive
progression of implementation rather than landing as a single opaque
commit covering a huge swath of the code base.
COUCHDB-3326
Co-authored-by: Mayya Sharipova <[email protected]>
Co-authored-by: jiangphcn <[email protected]>
> 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)