You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/04/04 21:33:42 UTC

[jira] [Commented] (COUCHDB-3326) Implement clustered purge API: _purge

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

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

Commit 016e1aa0ef4db0bbf47a28a2cce48b85200702d6 in couchdb-couch's branch refs/heads/COUCHDB-3288-remove-public-db-record from [~vatamane]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=016e1aa ]

Implement an ETS-basd couch_lru

Use a monotonicaly incrementing counter instead of `erlang:now()`. We don't
technically need to time-based functionality and just want to know relative
insertion order.

Instead of gb_tree, use an ordered_set ETS. This keep items sorted by their
update order, with most recent ones at the bottom.

An set ETS replaces the dictionary which maintains a mapping from database
names to their entry in updates table.

Interface is the same as the old couch_lru, so it is a direct swap in.

Thanks to Eric Avdey for intial version of test module.

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
>
> 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
(v6.3.15#6346)