You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/01/26 14:22:41 UTC

[GitHub] [couchdb] iilyak commented on a change in pull request #3347: Set a finite default for max_attachment_size

iilyak commented on a change in pull request #3347:
URL: https://github.com/apache/couchdb/pull/3347#discussion_r564547120



##########
File path: src/couch/src/couch_att.erl
##########
@@ -734,7 +734,7 @@ upgrade_encoding(Encoding) -> Encoding.
 
 
 max_attachment_size() ->
-    case config:get("couchdb", "max_attachment_size", "infinity") of
+    case config:get("couchdb", "max_attachment_size", 1024 * 1024 * 1024) of

Review comment:
       Erlang doesn't do compile time optimizations. I think multiplications would be slow. Could you use a define instead.
   
   ```
   % 1024 * 1024 * 1024
   -define(GB, 1073741824).
   
   ....
   max_attachment_size() ->
       case config:get("couchdb", "max_attachment_size", ?GB) of
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org