diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2009-08-15 01:55:32 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2009-08-15 01:55:32 +0000 |
commit | bff8b7d9751fad8319124fbfa238446170885b21 (patch) | |
tree | 0e0883ab715ddda6a132eb247240a7d9f0a0f370 /src/couchdb/couch_httpd_db.erl | |
parent | 3180e5aa8541d7969c95296607989c88056b598e (diff) |
delayed commits are now a config option, off by default. Closes COUCHDB-449
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@804427 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 55429cef..915a5eae 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -313,9 +313,11 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>]}=Req, Db) -> couch_stats_collector:increment({httpd, bulk_requests}), {JsonProps} = couch_httpd:json_body_obj(Req), DocsArray = proplists:get_value(<<"docs">>, JsonProps), - case couch_httpd:header_value(Req, "X-Couch-Full-Commit", "false") of + case couch_httpd:header_value(Req, "X-Couch-Full-Commit") of "true" -> Options = [full_commit]; + "false" -> + Options = [delay_commit]; _ -> Options = [] end, @@ -770,9 +772,11 @@ update_doc(Req, Db, DocId, Json) -> update_doc(Req, Db, DocId, Json, Headers) -> #doc{deleted=Deleted} = Doc = couch_doc_from_req(Req, DocId, Json), - case couch_httpd:header_value(Req, "X-Couch-Full-Commit", "false") of + case couch_httpd:header_value(Req, "X-Couch-Full-Commit") of "true" -> Options = [full_commit]; + "false" -> + Options = [delay_commit]; _ -> Options = [] end, |