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 2014/02/14 23:29:24 UTC

[jira] [Commented] (COUCHDB-2065) Overwrite a document with a single request

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

Robert Newson commented on COUCHDB-2065:
----------------------------------------

Always introducing a *conflict* on write is a kosher alternative, though COUCHDB-1948 discusses the very real performance issue associated with that.

> Overwrite a document with a single request
> ------------------------------------------
>
>                 Key: COUCHDB-2065
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2065
>             Project: CouchDB
>          Issue Type: New Feature
>      Security Level: public(Regular issues) 
>            Reporter: Nolan Lawson
>
> It would be convenient to have the option to overwrite documents with a single request, rather than having to GET, check the _rev, POST/PUT, possibly deal with conflicts, and then continue POST/PUTing until success.  It could be something as simple as:
> {code}
> PUT localhost:5984/mydb/mydoc?force=true 
> {code}
> If two callers attempt to update the same document at the same time, whoever gets there last would win.
> Prompted by a [discussion in PouchDB|https://github.com/daleharvey/pouchdb/issues/1388].



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)