diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2009-09-09 16:53:49 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2009-09-09 16:53:49 +0000 |
commit | 9b78e1555d73c888fedaa0b9d256abaeaadbe41a (patch) | |
tree | 921f620daaeb7116e5511db830e5ecb6d0498f98 /src/couchdb/couch_httpd_db.erl | |
parent | 85d1cbfc79eb0a04ec7f16624d6290920b4355ac (diff) |
choice of uuid algos for better insert perf. Closes COUCHDB-465. Thanks rnewson, bitdiddle
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@813051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 1a18c4ba..0f3835ae 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -308,7 +308,7 @@ db_req(#httpd{method='POST',path_parts=[DbName]}=Req, Db) -> Doc = couch_doc:from_json_obj(couch_httpd:json_body(Req)), Doc2 = case Doc#doc.id of <<"">> -> - Doc#doc{id=couch_util:new_uuid(), revs={0, []}}; + Doc#doc{id=couch_uuids:new(), revs={0, []}}; _ -> Doc end, @@ -385,7 +385,7 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>]}=Req, Db) -> Doc = couch_doc:from_json_obj(JsonObj), validate_attachment_names(Doc), Id = case Doc#doc.id of - <<>> -> couch_util:new_uuid(); + <<>> -> couch_uuids:new(); Id0 -> Id0 end, case proplists:get_value(<<"_rev">>, ObjProps) of |