[
https://issues.apache.org/jira/browse/COUCHDB-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13908702#comment-13908702
]
Nolan Lawson commented on COUCHDB-2065:
---------------------------------------
The "retry my change" rather than "retry my document" model sounds like a good
fit for CouchDB, and probably a more robust feature than what I've proposed
here. My main takeaway is that this feature is not really possible as a URI
request parameter, since it can't coexist with non-forced updates that are
generating conflicts. On the other hand, you could imagine configuring CouchDB
system-wide to run in "single-lineage" mode, where there are no conflicts and
the latest revision always wins, but at that point you might as well be using a
different database.
I guess I'd just like to point out that not everybody is using CouchDB because
it handles revisions/replication/eventual consistency so well, but rather
because it has a really sweet HTTP API that fits well with web applications.
Web devs are much more accustomed to the mental model of "overwrite this doc,
revision history be damned" (e.g. localStorage, IDB). It'd be nice if Couch
could support that without betraying its core philosophy, but based on this
discussion that doesn't seem very likely.
> 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)