aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-15 14:56:22 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-15 14:56:22 +0000
commit4e7a56b5f9e1600979cf3f3ce12f90240704ce59 (patch)
tree3f5e40f90130faf726fac2081896fc35cf118985
parentf04c8750cca2dcfd35aceae3379b83637b8aadfc (diff)
downloadgnunet-4e7a56b5f9e1600979cf3f3ce12f90240704ce59.tar.gz
gnunet-4e7a56b5f9e1600979cf3f3ce12f90240704ce59.zip
use better heuristic to deal with datastore put failures; log migration stop message transmissions
-rw-r--r--src/fs/gnunet-service-fs_cp.c3
-rw-r--r--src/fs/gnunet-service-fs_pr.c5
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)
1694 GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining 1694 GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining
1695 (cp->last_migration_block)); 1695 (cp->last_migration_block));
1696 memcpy (buf, &msm, sizeof (struct MigrationStopMessage)); 1696 memcpy (buf, &msm, sizeof (struct MigrationStopMessage));
1697 GNUNET_STATISTICS_update (GSF_stats,
1698 gettext_noop ("# migration stop messages sent"),
1699 1, GNUNET_NO);
1697 return sizeof (struct MigrationStopMessage); 1700 return sizeof (struct MigrationStopMessage);
1698} 1701}
1699 1702
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)
927 } 927 }
928 } 928 }
929 GNUNET_free (pmc); 929 GNUNET_free (pmc);
930 /* FIXME: should we really update the load value on failure? */ 930 /* on failure, increase the put load dramatically */
931 if (NULL != datastore_put_load) 931 if (NULL != datastore_put_load)
932 GNUNET_LOAD_update (datastore_put_load, delay.rel_value); 932 GNUNET_LOAD_update (datastore_put_load,
933 GNUNET_TIME_UNIT_HOURS.rel_value);
933 if (GNUNET_OK == success) 934 if (GNUNET_OK == success)
934 return; 935 return;
935 GNUNET_STATISTICS_update (GSF_stats, 936 GNUNET_STATISTICS_update (GSF_stats,