anchor.diff:                            || Url <- redis_helper:shard_urls()]),
       length(OldUrls) =:= length(NewIpsSorted)
           orelse erlang:error({invalid_ip_list, different_length_to_existing}),
  -    NewUrls = [ begin
  -                    OldInfo = redo_uri:parse(OldUrl),
  -                    NewInfo = lists:keyreplace(host, 1, OldInfo, {host, NewIp}),
  -                    to_redis_url(NewInfo)
  -                end
  +    NewUrls = [ update_redis_host(OldUrl, NewIp)
                   || {OldUrl, NewIp} <- lists:zip(OldUrls, NewIpsSorted)],
       lists:zip(OldUrls, NewUrls).
  -
  -to_redis_url(Info) ->
  -    Host = proplists:get_value(host, Info),
  -    Port = proplists:get_value(port, Info),
  -    Pass = proplists:get_value(pass, Info),
  -    lists:flatten(["redis://", Pass, "@", Host,
  -                   ":", integer_to_list(Port), "/"]).
   
   prepare_url_update(Nodes, OldNewMap) ->
       lists:foldl(fun (Node, {good, Acc}) ->
  
positive.code: 
  stop_buffer(Pid) ->
      logplex_queue:stop(Pid).
  
negative.code: 
  populate_info_table(Urls) ->
      %% Populate Read pool
      ReadPools = [ {Url, add_pool(Url)} || Url <- redis_sort(Urls)],
      {ok, Map1, Interval1} =
          redis_shard:generate_map_and_interval(redis_sort(ReadPools)),
      logplex_shard_info:save(logplex_read_pool_map, Map1, Interval1),
  
      %% Populate write pool
      WritePools = [ {Url, add_buffer(Url)}
                     || Url <- redis_sort(Urls)],
      {ok, Map2, Interval2} =
          redis_shard:generate_map_and_interval(WritePools),
  
      logplex_shard_info:save(logplex_redis_buffer_map, Map2, Interval2),
  
      ok.
  
  add_pool(Url) ->
      Opts = parse_redis_uri(Url),
      {ok, Pool} = redo:start_link(undefined, Opts),
      Pool.
  
  