The builting _sum reduce function has no protection against overflowing reduce values. Users can emit objects with enough unique keys to cause the builtin _sum to create objects that are exceedingly large in the inner nodes of the view B+Tree.
This change adds the same logic that applies to JavaScript reduce functions to check if a reduce function is properly reducing its input. ## Testing recommendations make check ## Checklist - [x] Code is written and works correctly; - [ ] Changes are covered by tests; - [ ] Documentation reflects the changes; [ Full content available at: https://github.com/apache/couchdb/pull/1574 ] This message was relayed via gitbox.apache.org for [email protected]
