nickva commented on code in PR #4709:
URL: https://github.com/apache/couchdb/pull/4709#discussion_r1278295062
##########
src/mango/src/mango_cursor_view.erl:
##########
@@ -252,6 +252,11 @@ execute(#cursor{db = Db, index = Idx, execution_stats =
Stats} = Cursor0, UserFu
UserFun, Cursor, Stats1, FinalUserAcc0
),
{ok, FinalUserAcc1};
+ {ok, Error} when is_tuple(Error) ->
+ % fabric_view_all_docs turns {error, Resp} results into
{ok, Resp}
+ % for some reason. If we didn't get a proper cursor
record, assume
Review Comment:
It’s been like that for years and it’s probably expected to return that in
other places where all_docs is used. Since we don’t have rigorous tests for
error conditions we’d probably break something else.
##########
src/mango/src/mango_cursor_view.erl:
##########
@@ -252,6 +252,11 @@ execute(#cursor{db = Db, index = Idx, execution_stats =
Stats} = Cursor0, UserFu
UserFun, Cursor, Stats1, FinalUserAcc0
),
{ok, FinalUserAcc1};
+ {ok, Error} when is_tuple(Error) ->
+ % fabric_view_all_docs turns {error, Resp} results into
{ok, Resp}
+ % for some reason. If we didn't get a proper cursor
record, assume
Review Comment:
It’s been like that for years and it’s probably expected to return that in
other places where all_docs is used. Since we don’t have rigorous tests for
error conditions we’d probably break something else.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]