Skip to content
Browse files

MB-100: ignore mark-indexable calls on non-unindexable partitions

Because that's more convenient for stateless capi_set_view_manager
inside ns_server.

Change-Id: I90c7799a7e6dc5a7555fd76895a5dbd72531d0e7
Reviewed-on: http://review.couchbase.org/19350
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  • Loading branch information...
1 parent e024aaf commit 8e8d96380758166d1106bf147230ada179bf6f44 Aliaksey Kandratsenka committed with fdmanana Aug 7, 2012
Showing with 6 additions and 9 deletions.
  1. +6 −9 src/couch_set_view/src/couch_set_view_group.erl
View
15 src/couch_set_view/src/couch_set_view_group.erl
@@ -2938,16 +2938,13 @@ process_mark_as_indexable(State0, Partitions, CommitHeader) ->
fun(PartId, {AccSeqs, AccUnSeqs}) ->
case orddict:is_key(PartId, AccUnSeqs) of
false ->
- ErrorMsg = io_lib:format("Partition ~p is not currently "
- "marked as unindexable", [PartId]),
- throw({error, iolist_to_binary(ErrorMsg)});
+ {AccSeqs, AccUnSeqs};
true ->
- ok
- end,
- Seq = orddict:fetch(PartId, AccUnSeqs),
- AccUnSeqs2 = orddict:erase(PartId, AccUnSeqs),
- AccSeqs2 = orddict:store(PartId, Seq, AccSeqs),
- {AccSeqs2, AccUnSeqs2}
+ Seq = orddict:fetch(PartId, AccUnSeqs),
+ AccUnSeqs2 = orddict:erase(PartId, AccUnSeqs),
+ AccSeqs2 = orddict:store(PartId, Seq, AccSeqs),
+ {AccSeqs2, AccUnSeqs2}
+ end
end,
{?set_seqs(Group), ?set_unindexable_seqs(Group)},
Partitions),

0 comments on commit 8e8d963

Please sign in to comment.
Something went wrong with that request. Please try again.