This is an existing bug that I had filed a while back: https://issues.apache.org/jira/browse/COUCHDB-514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776455#action_12776455
I tried to take a stab at it, but got lost in Erlang... :^( On Wed, Dec 30, 2009 at 4:27 PM, Joscha Feth <[email protected]> wrote: > Hi there, > > I was experiencing problems with _list functions lately, and I narrowed > down the problem: > > list function A: > ---------------- > function(head,req) { > if(true) { > start({"code": 401}); > } else { > start({"code": 200}); > } > } > > list function B: > ---------------- > function(head,req) { > getRow(); > if(true) { > start({"code": 401}); > } else { > start({"code": 200}); > } > } > > > as you can see A and B are completely identical except list function B > has an additional call to getRow(). > Now I would expect those list functions to return the same result > (always return a 401), but list function B actually always returns a > 200 - regardless of what code is given in start(). > It seems as if the call to getRow() always makes the list function > return a 200. Is this a bug or am I missing something? I am on CouchDB > 0.10 Windows. > > regards, > Joscha > > -- > > >
