From 4e7a56b5f9e1600979cf3f3ce12f90240704ce59 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 15 Dec 2011 14:56:22 +0000 Subject: [PATCH] use better heuristic to deal with datastore put failures; log migration stop message transmissions --- src/fs/gnunet-service-fs_cp.c | 3 +++ src/fs/gnunet-service-fs_pr.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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, -- 2.25.1