[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14193 - in gnunet: . contrib src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14193 - in gnunet: . contrib src/fs |
Date: |
Mon, 17 Jan 2011 15:14:33 +0100 |
Author: grothoff
Date: 2011-01-17 15:14:33 +0100 (Mon, 17 Jan 2011)
New Revision: 14193
Modified:
gnunet/TODO
gnunet/contrib/defaults.conf
gnunet/src/fs/fs_test_lib.c
gnunet/src/fs/gnunet-service-fs.c
Log:
adding lifetime limits on migration content
Modified: gnunet/TODO
===================================================================
--- gnunet/TODO 2011-01-17 14:02:11 UTC (rev 14192)
+++ gnunet/TODO 2011-01-17 14:14:33 UTC (rev 14193)
@@ -15,11 +15,6 @@
+ insert
+ download
+ search
- - exclude content that will "soon" expire from migration
- - make migration data rate & datastore IO-rate configurable
- - exclude certain peers as targets (based on hash values) in each
- iteration => same peer can only be picked every n-th iteration
- for the same content => fewer duplicate sending!
* GNUNET-GTK: [CG]
- figure out where in the GUI we should show active upload operations and
allow aborts
- handle events:
Modified: gnunet/contrib/defaults.conf
===================================================================
--- gnunet/contrib/defaults.conf 2011-01-17 14:02:11 UTC (rev 14192)
+++ gnunet/contrib/defaults.conf 2011-01-17 14:14:33 UTC (rev 14193)
@@ -286,6 +286,9 @@
# DISABLE_SOCKET_FORWARDING = NO
# DEBUG = YES
MAX_PENDING_REQUESTS = 65536
+# Maximum frequency we're allowed to poll the datastore
+# for content for migration (can be used to reduce
+# GNUnet's disk-IO rate)
MIN_MIGRATION_DELAY = 1000
EXPECTED_NEIGHBOUR_COUNT = 128
Modified: gnunet/src/fs/fs_test_lib.c
===================================================================
--- gnunet/src/fs/fs_test_lib.c 2011-01-17 14:02:11 UTC (rev 14192)
+++ gnunet/src/fs/fs_test_lib.c 2011-01-17 14:14:33 UTC (rev 14193)
@@ -33,6 +33,8 @@
#define CONNECT_ATTEMPTS 4
+#define CONTENT_LIFETIME GNUNET_TIME_UNIT_HOURS
+
/**
* Handle for a daemon started for testing FS.
*/
@@ -673,7 +675,7 @@
do_index,
anonymity,
42 /* priority */,
-
GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS));
+
GNUNET_TIME_relative_to_absolute (CONTENT_LIFETIME));
}
else
{
@@ -687,7 +689,7 @@
do_index,
anonymity,
42 /* priority */,
-
GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS));
+
GNUNET_TIME_relative_to_absolute (CONTENT_LIFETIME));
}
daemon->publish_context = GNUNET_FS_publish_start (daemon->fs,
fi,
Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c 2011-01-17 14:02:11 UTC (rev 14192)
+++ gnunet/src/fs/gnunet-service-fs.c 2011-01-17 14:14:33 UTC (rev 14193)
@@ -92,6 +92,15 @@
#define MAX_DHT_PUT_FREQ GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 5)
/**
+ * How long must content remain valid for us to consider it for migration?
+ * If content will expire too soon, there is clearly no point in pushing
+ * it to other peers. This value gives the threshold for migration. Note
+ * that if this value is increased, the migration testcase may need to be
+ * adjusted as well (especially the CONTENT_LIFETIME in fs_test_lib.c).
+ */
+#define MIN_MIGRATION_CONTENT_LIFETIME GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_MINUTES, 30)
+
+/**
* Inverse of the probability that we will submit the same query
* to the same peer again. If the same peer already got the query
* repeatedly recently, the probability is multiplied by the inverse
@@ -1283,6 +1292,13 @@
consider_migration_gathering ();
return;
}
+ if (GNUNET_TIME_absolute_get_remaining (expiration).rel_value <
+ MIN_MIGRATION_CONTENT_LIFETIME.rel_value)
+ {
+ /* content will expire soon, don't bother */
+ GNUNET_DATASTORE_get_next (dsh, GNUNET_YES);
+ return;
+ }
if (type == GNUNET_BLOCK_TYPE_FS_ONDEMAND)
{
if (GNUNET_OK !=
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14193 - in gnunet: . contrib src/fs,
gnunet <=