anchor.diff:          {error, econnrefused} when Retry > 0 ->
               ?info("Unable to connect to ~p", [DB]),
               ServerPid ! restart,
  +            timer:sleep(crypto:rand_uniform(20, 50)),
               db_run(Mod, Fun, Args, Retry - 1);
           Other -> Other
       end.
  -
   
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
positive.code: -define(MAX_VALUE_SIZE, 512 * 1024).
  
  %% Base port for gateway endpoints
  -define(GATEWAY_BASE_PORT, 5084).
  
  %% store_driver_behaviour callbacks
  -export([init_bucket/3, healthcheck/1, init_driver/1]).
  
negative.code: %%--------------------------------------------------------------------
  -spec start_gateway(Parent :: pid(), N :: non_neg_integer(), Hostname :: binary(), Port :: non_neg_integer()) -> no_return().
  start_gateway(Parent, N, Hostname, Port) ->
      GWPort = crypto:rand_uniform(?GATEWAY_BASE_PORT_MIN, ?GATEWAY_BASE_PORT_MAX),
      GWAdminPort = GWPort + 1000,
      ?info("Statring couchbase gateway #~p: localhost:~p => ~p:~p", [N, GWPort, Hostname, Port]),
  
  