Resolution: Won't Fix
Affects Version/s: None
Fix Version/s: None
Component/s: Database Core
COUCHDB-3387, there is another serious issue with the query server protocol violation.
Just look into the following log:
As you can see, the third input line sends reduce function to add_fun. This is against the rules. According to the documentation:
(http://docs.couchdb.org/en/2.0.0/query-server/protocol.html#add-fun), the argument of this command is: Map function source code..
Why is it called with a reduce function ?
I can guess the reason. The couchDb core uses queryserver's add_fun to check, whether the string contains a valid function. This is not ordinary bug in code, this is very bad decision which may result to a lot of confusions.
I suggest to use the "ddoc/new" command instead the "add_fun" (http://docs.couchdb.org/en/2.0.0/query-server/protocol.html#ddoc) to check whether the design document is valid. The query server can eventually validate every function in it including the shared code ("lib" section).
This is the serious bug for me now. Fixing this bug also resolves
COUCHDB-3387 issue. However, leaving this unfixed prevents me to upgrade to the CouchDB 2.0.