From: Christian Grothoff Date: Thu, 15 Dec 2011 14:56:22 +0000 (+0000) Subject: use better heuristic to deal with datastore put failures; log migration stop message... X-Git-Tag: initial-import-from-subversion-38251~15629 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4e7a56b5f9e1600979cf3f3ce12f90240704ce59;p=oweals%2Fgnunet.git use better heuristic to deal with datastore put failures; log migration stop message transmissions --- diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 9d2385378..7560975db 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c @@ -1694,6 +1694,9 @@ create_migration_stop_message (void *cls, size_t size, void *buf) GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining (cp->last_migration_block)); memcpy (buf, &msm, sizeof (struct MigrationStopMessage)); + GNUNET_STATISTICS_update (GSF_stats, + gettext_noop ("# migration stop messages sent"), + 1, GNUNET_NO); return sizeof (struct MigrationStopMessage); } diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 1bd16c9f1..aa18e2fc8 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c @@ -927,9 +927,10 @@ put_migration_continuation (void *cls, int success, const char *msg) } } GNUNET_free (pmc); - /* FIXME: should we really update the load value on failure? */ + /* on failure, increase the put load dramatically */ if (NULL != datastore_put_load) - GNUNET_LOAD_update (datastore_put_load, delay.rel_value); + GNUNET_LOAD_update (datastore_put_load, + GNUNET_TIME_UNIT_HOURS.rel_value); if (GNUNET_OK == success) return; GNUNET_STATISTICS_update (GSF_stats,