Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 2736: Only run servers for buckets that are actually mapped

This will automatically shut down buckets when we fail a node. In
addition, with the ns_vbm_sup change it will cause vbucketmigrators to
shut down.

Change-Id: If8eac8c54cff7dcb1f736a9161a0735f6fe7c432
Reviewed-on: http://review.northscale.com/3179
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information...
commit fc5f6b85e375f637ca2053993e4d583c4468792e 1 parent 3119b5b
@seanlynch seanlynch authored alk committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/ns_bucket_sup.erl
View
7 src/ns_bucket_sup.erl
@@ -40,8 +40,11 @@ init({Name, ChildFun}) ->
fun (Event, State) ->
case Event of
{buckets, L} ->
- Buckets = [B || {B, _} <-
- proplists:get_value(configs, L)],
+ Node = node(),
+ Buckets =
+ [B || {B, C} <- proplists:get_value(configs, L),
+ lists:member(Node, proplists:get_value(
+ servers, C, []))],
update_childs(Name, ChildFun, Buckets);
_ -> ok
end,
Please sign in to comment.
Something went wrong with that request. Please try again.