anchor.diff:      supervisor:start_link({local, ?MODULE}, ?MODULE, []).
   
   init([]) ->
  -    Childs =
  -        [{index_stats_childs_sup, {supervisor, start_link, [{local, index_stats_childs_sup}, ?MODULE, child]},
  +    Children =
  +        [{index_stats_children_sup,
  +          {supervisor, start_link, [{local, index_stats_children_sup}, ?MODULE, child]},
             permanent, infinity, supervisor, []},
            {index_stats_worker, {erlang, apply, [fun start_link_worker/0, []]},
             permanent, 1000, worker, []},
  
positive.code:     {ok, {{one_for_all,
             misc:get_env_default(max_r, 3),
             misc:get_env_default(max_t, 10)},
            Childs}};
  init(child) ->
      {ok, {{one_for_one,
             misc:get_env_default(max_r, 3),
  
negative.code:                            Mod <- [stats_archiver, stats_reader]])
      end.
  
  refresh_children() ->
      RunningChildren0 = [Id || {Id, _, _, _} <- supervisor:which_children(index_stats_children_sup)],
      RunningChildren = lists:sort(RunningChildren0),
      WantedChildren = compute_wanted_children(ns_config:get()),
      ToStart = ordsets:subtract(WantedChildren, RunningChildren),
      ToStop = ordsets:subtract(RunningChildren, WantedChildren),
      [start_new_child(Mod, Name) || {Mod, Name} <- ToStart],
      [stop_child({Mod, Name}) || {Mod, Name} <- ToStop],
      ok.
  
  start_new_child(Mod, Name) when Mod =:= stats_archiver; Mod =:= stats_reader ->
      {ok, _Pid} = supervisor:start_child(
                     index_stats_children_sup,
                     {{Mod, Name},
                      {Mod, start_link, ["@index-" ++ Name]},
                      permanent, 1000, worker, []}).
  
  stop_child(Id) ->
      ok = supervisor:terminate_child(index_stats_children_sup, Id),
      ok = supervisor:delete_child(index_stats_children_sup, Id).
  
  start_link_worker() ->
      RV = {ok, _} = work_queue:start_link(
  