couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/5] couchdb commit: updated refs/heads/1843-feature-bigcouch to 10dcfc5
Date Wed, 21 May 2014 16:53:30 GMT
Repository: couchdb
Updated Branches:
  refs/heads/1843-feature-bigcouch 45e88835d -> 10dcfc5de


Configurable upper bound to _uuids count parameter


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/66627720
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/66627720
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/66627720

Branch: refs/heads/1843-feature-bigcouch
Commit: 66627720b8828efe2e9084ebb5cd33c3bf5e0b23
Parents: 45e8883
Author: Robert Newson <rnewson@apache.org>
Authored: Tue Mar 25 15:02:50 2014 +0000
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed May 21 17:03:15 2014 +0100

----------------------------------------------------------------------
 etc/couchdb/default.ini.tpl.in | 2 ++
 share/www/script/test/uuids.js | 4 ++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/66627720/etc/couchdb/default.ini.tpl.in
----------------------------------------------------------------------
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in
index 8ff76d5..65ebf78 100644
--- a/etc/couchdb/default.ini.tpl.in
+++ b/etc/couchdb/default.ini.tpl.in
@@ -211,6 +211,8 @@ algorithm = sequential
 ; The utc_id_suffix value will be appended to uuids generated by the utc_id algorithm.
 ; Replicating instances should have unique utc_id_suffix values to ensure uniqueness of utc_id
ids.
 utc_id_suffix =
+# Maximum number of UUIDs retrievable from /_uuids in a single request
+max_count = 1000
 
 [stats]
 ; rate is in milliseconds

http://git-wip-us.apache.org/repos/asf/couchdb/blob/66627720/share/www/script/test/uuids.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/uuids.js b/share/www/script/test/uuids.js
index 6f5d223..d304c4e 100644
--- a/share/www/script/test/uuids.js
+++ b/share/www/script/test/uuids.js
@@ -80,6 +80,10 @@ couchTests.uuids = function(debug) {
     }
   };
 
+  // test max_uuid_count
+  var xhr = CouchDB.request("GET", "/_uuids?count=1001");
+  TEquals(403, xhr.status, "should error when count > max_count");
+
   run_on_modified_server([{
       "section": "uuids",
       "key": "algorithm",


Mime
View raw message