use randomized backoff

This commit is contained in:
Florian Dold 2018-09-26 17:37:33 +02:00
parent eada4b9ecd
commit 3ab7f8b840
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
5 changed files with 7 additions and 7 deletions

View File

@ -848,7 +848,7 @@ keys_completed_cb (void *cls,
free_keys_request (kr);
exchange->kr = NULL;
GNUNET_assert (NULL == exchange->retry_task);
exchange->retry_delay = GNUNET_TIME_STD_BACKOFF (exchange->retry_delay);
exchange->retry_delay = GNUNET_TIME_randomized_backoff (exchange->retry_delay);
exchange->retry_task = GNUNET_SCHEDULER_add_delayed (exchange->retry_delay,
&request_keys,
exchange);

View File

@ -181,7 +181,7 @@ deposit_cb (void *cls,
if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec)
ds->backoff = GNUNET_TIME_UNIT_ZERO;
else
ds->backoff = GNUNET_TIME_STD_BACKOFF (ds->backoff);
ds->backoff = GNUNET_TIME_randomized_backoff (ds->backoff);
ds->retry_task = GNUNET_SCHEDULER_add_delayed (ds->backoff,
&do_retry,
ds);

View File

@ -212,7 +212,7 @@ add_incoming_cb (void *cls,
if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec)
fts->backoff = GNUNET_TIME_UNIT_ZERO;
else
fts->backoff = GNUNET_TIME_STD_BACKOFF (fts->backoff);
fts->backoff = GNUNET_TIME_randomized_backoff (fts->backoff);
fts->retry_task = GNUNET_SCHEDULER_add_delayed (fts->backoff,
&do_retry,
fts);

View File

@ -322,7 +322,7 @@ reveal_cb (void *cls,
if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec)
rrs->backoff = GNUNET_TIME_UNIT_ZERO;
else
rrs->backoff = GNUNET_TIME_STD_BACKOFF (rrs->backoff);
rrs->backoff = GNUNET_TIME_randomized_backoff (rrs->backoff);
rrs->retry_task = GNUNET_SCHEDULER_add_delayed (rrs->backoff,
&do_reveal_retry,
rrs);
@ -551,7 +551,7 @@ link_cb (void *cls,
if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec)
rls->backoff = GNUNET_TIME_UNIT_ZERO;
else
rls->backoff = GNUNET_TIME_STD_BACKOFF (rls->backoff);
rls->backoff = GNUNET_TIME_randomized_backoff (rls->backoff);
rls->retry_task = GNUNET_SCHEDULER_add_delayed (rls->backoff,
&do_link_retry,
rls);
@ -837,7 +837,7 @@ melt_cb (void *cls,
if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec)
rms->backoff = GNUNET_TIME_UNIT_ZERO;
else
rms->backoff = GNUNET_TIME_STD_BACKOFF (rms->backoff);
rms->backoff = GNUNET_TIME_randomized_backoff (rms->backoff);
rms->retry_task = GNUNET_SCHEDULER_add_delayed (rms->backoff,
&do_melt_retry,
rms);

View File

@ -183,7 +183,7 @@ reserve_withdraw_cb (void *cls,
if (TALER_EC_DB_COMMIT_FAILED_ON_RETRY == ec)
ws->backoff = GNUNET_TIME_UNIT_ZERO;
else
ws->backoff = GNUNET_TIME_STD_BACKOFF (ws->backoff);
ws->backoff = GNUNET_TIME_randomized_backoff (ws->backoff);
ws->retry_task = GNUNET_SCHEDULER_add_delayed (ws->backoff,
&do_retry,
ws);