nickva commented on code in PR #4984:
URL: https://github.com/apache/couchdb/pull/4984#discussion_r1522524560


##########
src/mango/src/mango_cursor_view.erl:
##########
@@ -383,22 +381,23 @@ view_cb({row, Row}, #mrargs{extra = Options} = Acc) ->
             % However, this oddness is confined to being visible in this 
module.
             case match_and_extract_doc(Doc, Selector, Fields) of
                 {match, FinalDoc} ->
-                    FinalViewRow = ViewRow#view_row{doc = FinalDoc},
-                    ok = rexi:stream2(FinalViewRow),
+                    ViewRow = fabric_view_row:set_doc(ViewRow0, FinalDoc),

Review Comment:
   Suggestion: might be simpler  to use `ViewRow1` here and keep `ViewRow` 
everywhere else, instead of having `ViewRow0` everywhere else.
   
   The typical pattern is to use `Var0` for the first few lines in a function,  
prior to transforming it into `Var` near the top of the function and then use 
Var. This is usually for validation and such. Then `Var` would be the most used 
value and then if it's updated it's `Var1`, `Var2`, ...



-- 
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: notifications-unsubscr...@couchdb.apache.org

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

Reply via email to