couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Update of "HTTP Document API" by ChrisAnderson
Date Mon, 04 May 2009 20:08:15 GMT
Dear Wiki user,

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

The following page has been changed by ChrisAnderson:

The comment on the change is:
document batch=ok

  {"error":"conflict","reason":"Document update conflict."}
+ 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
+ ''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.
  === POST ===

View raw message