This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/main by this push:
new a15a93a comment out max_document_size
a15a93a is described below
commit a15a93ac4db36c586100b84e13ed1ebc3c2bcf08
Author: jiahuili <[email protected]>
AuthorDate: Thu Jul 1 14:59:50 2021 -0500
comment out max_document_size
---
rel/overlay/etc/default.ini | 2 +-
test/elixir/test/bulk_docs_test.exs | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index 09d1887..a65d667 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -35,7 +35,7 @@ uuid = {{uuid}}
; requests which update a single document as well as individual documents from
; a _bulk_docs request. The size limit is approximate due to the nature of JSON
; encoding. The size limit must be less than or equal to 8000000 bytes.
-max_document_size = 8000000 ; bytes
+;max_document_size = 8000000 ; bytes
;
; Maximum number of documents in a _bulk_docs request. Anything larger
; returns a 413 error for the whole request
diff --git a/test/elixir/test/bulk_docs_test.exs
b/test/elixir/test/bulk_docs_test.exs
index 74500d4..7d7948f 100644
--- a/test/elixir/test/bulk_docs_test.exs
+++ b/test/elixir/test/bulk_docs_test.exs
@@ -132,11 +132,9 @@ defmodule BulkDocsTest do
@tag :with_db
test "bulk docs raises error for transaction larger than 10MB", ctx do
- docs = [%{_id: "0", a: random_string(16_000_000)}]
- old_size =
Couch.get("/_node/[email protected]/_config/couchdb/max_document_size").body
- set_config_raw("couchdb", "max_document_size", "67108864") # 64M
+ # the default value for max_document_size is 8_000_000
+ docs = [%{_id: "0", a: random_string(9_000_000)}]
resp = Couch.post("/#{ctx[:db_name]}/_bulk_docs", body: %{docs: docs})
- set_config_raw("couchdb", "max_document_size", old_size) # set back
assert resp.status_code == 413
assert resp.body["error"] == "document_too_large"
assert resp.body["reason"] == "0" # DocID