couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "HTTP_Document_API" by JensAlfke
Date Wed, 04 Jan 2012 18:02:44 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "HTTP_Document_API" page has been changed by JensAlfke:
http://wiki.apache.org/couchdb/HTTP_Document_API?action=diff&rev1=88&rev2=89

Comment:
Added info about new_edits=false option to PUT.

  
  {"error":"conflict","reason":"Document update conflict."}
  }}}
+ 
+ In case for some reason you need to insert a conflicting revision, PUT supports the ''new_edits=false''
query option, which is described in detail under [[HTTP_Bulk_Document_API#Posting_Existing_Revisions]].
+ 
  There is a query option ''batch=ok'' which can be used to achieve higher throughput at the
cost of lower guarantees. When a ''PUT'' (or a document ''POST'' as described below) is sent
using this option, it is not immediately written to disk. Instead it is stored in memory on
a per-user basis for a second or so (or the number of docs in memory reaches a certain point).
After the threshold has passed, the docs are committed to disk. Instead of waiting for the
doc to be written to disk before responding, CouchDB sends an HTTP ''202 Accepted'' response
immediately.
  
  ''batch=ok'' is not suitable for crucial data, but it ideal for applications like logging
which can accept the risk that a small proportion of updates could be lost due to a crash.
Docs in the batch can also be flushed manually using the ''_ensure_full_commit'' API.

Mime
View raw message