Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify max seq numbers calculation

Merging 2 lists of sequence numbers (by maximum) is
already performed by the function process_map_results/3.

Change-Id: I1728dc55ce2a34d3c148bbaa7f6f73e89a69d328
Reviewed-on: http://review.couchbase.org/25012
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  • Loading branch information...
commit 441cd50f073830dbc2e46e5d78a8686a83f9d455 1 parent 30a784e
@fdmanana fdmanana authored fdmanana committed
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/couch_set_view/src/couch_set_view_updater.erl
View
8 src/couch_set_view/src/couch_set_view_updater.erl
@@ -580,12 +580,8 @@ flush_writes(#writer_acc{initial_build = false} = Acc0) ->
owner = Owner,
last_seqs = LastSeqs
} = Acc0,
- {ViewKVs, DocIdViewIdKeys, NewPartIdSeqs} =
- process_map_results(Kvs, ViewEmptyKVs, orddict:new()),
- NewLastSeqs = orddict:merge(
- fun(_, S1, S2) -> erlang:max(S1, S2) end,
- LastSeqs,
- NewPartIdSeqs),
+ {ViewKVs, DocIdViewIdKeys, NewLastSeqs} =
+ process_map_results(Kvs, ViewEmptyKVs, LastSeqs),
Acc1 = Acc0#writer_acc{last_seqs = NewLastSeqs},
Acc = write_to_tmp_batch_files(ViewKVs, DocIdViewIdKeys, Acc1),
#writer_acc{group = NewGroup} = Acc,
Please sign in to comment.
Something went wrong with that request. Please try again.