davisp commented on a change in pull request #2585: Mango Indexes on FoundationDB URL: https://github.com/apache/couchdb/pull/2585#discussion_r393747846
########## File path: src/couch_views/src/couch_views_indexer.erl ########## @@ -236,20 +267,26 @@ process_changes(Change, Acc) -> IncludeDesign = lists:keymember(<<"include_design">>, 1, DesignOpts), - Acc1 = case {Id, IncludeDesign} of - {<<?DESIGN_DOC_PREFIX, _/binary>>, false} -> - maps:merge(Acc, #{ - count => Count + 1, - last_seq => LastSeq - }); - _ -> - Acc#{ - doc_acc := DocAcc ++ [Change], - count := Count + 1, - last_seq := LastSeq - } - end, - {ok, Acc1}. + DocVS = fabric2_fdb:next_vs(fabric2_fdb:seq_to_vs(LastSeq)), + case BuildToVS == true andalso ViewVs =< DocVS of Review comment: Wait... is `build_to_vs` a `boolean()`? I was thinking it was the versionstamp to build to. That explains why the logic wasn't matching up with what I expected. I'd change `build_to_vs` to `true | versionstamp()`. Will have to look, but overloading `view_seq` also likely means that restarts probably don't work? How would we track where the build is at if the job has to restart? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services