Repository: couchdb-fabric Updated Branches: refs/heads/fix-unsorted-views [created] 4c7aef10f
Add unsorted_meta callback for delayed meta Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/4c7aef10 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/4c7aef10 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/4c7aef10 Branch: refs/heads/fix-unsorted-views Commit: 4c7aef10f300a64333fe9643c6c64e6f720c2447 Parents: 4553f90 Author: Russell Branca <[email protected]> Authored: Fri Jul 15 00:22:22 2016 +0000 Committer: Russell Branca <[email protected]> Committed: Fri Jul 15 00:22:22 2016 +0000 ---------------------------------------------------------------------- src/fabric_view_map.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/4c7aef10/src/fabric_view_map.erl ---------------------------------------------------------------------- diff --git a/src/fabric_view_map.erl b/src/fabric_view_map.erl index a71e01a..eb8c5b1 100644 --- a/src/fabric_view_map.erl +++ b/src/fabric_view_map.erl @@ -129,7 +129,11 @@ handle_message({meta, Meta0}, {Worker, From}, State) -> _ -> [{update_seq, fabric_view_changes:pack_seqs(UpdateSeq)}] end, - {Go, Acc} = Callback({meta, Meta}, AccIn), + MetaType = case State#collector.sorted of + true -> meta; + false -> unsorted_meta + end, + {Go, Acc} = Callback({MetaType, Meta}, AccIn), {Go, State#collector{ counters = fabric_dict:decrement_all(Counters1), total_rows = Total,
