+ 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:
# 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
#define CONNECT_ATTEMPTS 4
+#define CONTENT_LIFETIME GNUNET_TIME_UNIT_HOURS
+
/**
* Handle for a daemon started for testing FS.
*/
do_index,
anonymity,
42 /* priority */,
- GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS));
+ GNUNET_TIME_relative_to_absolute (CONTENT_LIFETIME));
}
else
{
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,
*/
#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
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 !=