anchor.diff:            {node, node(), remote_clusters_info_config_update_interval}, 10000)).
   
   -record(state, {cache_path :: string(),
  -                scheduled_config_updates :: set()}).
  +                scheduled_config_updates :: set(),
  +                remote_bucket_requests :: dict(),
  +                remote_bucket_waiters :: dict(),
  +                remote_bucket_waiters_trefs :: dict()}).
   
   start_link() ->
       gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
  
positive.code:             end
      end.
  
  remote_cluster_and_bucket(#remote_cluster{nodes=Nodes,
                                            uuid=UUID},
                            BucketStr, Username, Password) ->
      Bucket = list_to_binary(BucketStr),
      ShuffledNodes = misc:shuffle(Nodes),
  
      remote_bucket_from_nodes(ShuffledNodes, Bucket, Username, Password, UUID).
  
  remote_bucket_from_nodes([], _, _, _, _) ->
      {error, all_nodes_failed,
       <<"Failed to grab remote bucket info from any of known nodes">>};
  remote_bucket_from_nodes([Node | Rest], Bucket, Username, Password, UUID) ->
      R = remote_bucket(Node, Bucket, Username, Password, UUID),
  
      case R of
          {ok, _} ->
              R;
          {error, Type, _} when Type =:= not_present;
                                Type =:= not_capable ->
              R;
          Other ->
              ?log_info("Failed to get bucket info from node ~p:~n~p", [Node, Other]),
              remote_bucket_from_nodes(Rest, Bucket, Username, Password, UUID)
      end.
  
  remote_bucket(#remote_node{host=Host, port=Port},
                Bucket, Username, Password, UUID) ->
      Creds = {Username, Password},
  
      JsonGet = mk_json_get(Host, Port, Username, Password),
  
negative.code:             R = menelaus_rest:json_request_hilevel(get,
                                                     {Host, Port, Path},
                                                     {Username, Password},
                                                     [{connect_timeout, 30000},
                                                      {timeout, 60000}]),
  
              case R of
                  {ok, Value} ->
  