anchor.diff:      [{Stat, statistics(Stat)} || Stat <- Stats].
   
   %% Internal fuctions
  +buckets_replication_statuses() ->
  +    BucketConfigs = ns_bucket:get_buckets(),
  +    [{Bucket, replication_status(Bucket, BucketConfig)} ||
  +        {Bucket, BucketConfig} <- BucketConfigs].
  +
   current_status(Expensive) ->
       ClusterCompatVersion = case (catch list_to_integer(os:getenv("MEMBASE_CLUSTER_COMPAT_VERSION"))) of
                                  X when is_integer(X) -> X;
  
positive.code:                     %% No replicas for this node
                      1.0;
                  Replicas ->
                      Replicators = ns_vbm_sup:replicators([node()],
                                                           Bucket),
                      case Replicas -- Replicators of
                          [] ->
                              %% Ok, running
                                      case ns_memcached:backfilling(Bucket) of
                                          true ->
                                              0.5;
                                          false ->
                                              1.0
                                      end;
                          _ ->
                              %% Replication isn't even running
                              0.0
                      end
              end
  
negative.code: init([]) ->
      timer:send_interval(1000, beat),
      timer:send_interval(?EXPENSIVE_CHECK_INTERVAL, do_expensive_checks),
      self() ! do_expensive_checks,
      {ok, undefined}.
  
  handle_call(status, _From, State) ->
      {reply, current_status(State), State};
  