couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Newson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2065) Overwrite a document with a single request
Date Sat, 15 Feb 2014 00:54:22 GMT

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

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

The problem is that a document's revision history is not linear, it's a tree. Further, if
a document is at C and you update the document at the same time as someone else does, which
of you gets to make D? For a single node, you might say, "in time order", but what if you
update document at C on node 1 and someone else updates document at C on node 2? You'll both
make D, neither of you will make E.

The reason an update is to a specific revision is precisely so we can determine which changes
were concurrently applied in disconnected replicas.

> 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)

Mime
View raw message