use better heuristic to deal with datastore put failures; log migration stop message...
authorChristian Grothoff <christian@grothoff.org>
Thu, 15 Dec 2011 14:56:22 +0000 (14:56 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 15 Dec 2011 14:56:22 +0000 (14:56 +0000)
src/fs/gnunet-service-fs_cp.c
src/fs/gnunet-service-fs_pr.c

index 9d2385378df28c811f8d6fa2f58b376b0ff80a55..7560975db9c43401c33ec2c4f48fc85e223784d2 100644 (file)
@@ -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);
 }
 
index 1bd16c9f157a1db6089facce1ad9c210c4fc705d..aa18e2fc832a1ff5ad9dc59c64c612c343192f21 100644 (file)
@@ -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,