From a8871b8ff983bdb8adc224a9a88ba5d2960df859 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 25 Jul 2009 10:30:50 +0000 Subject: [PATCH] fx --- src/datastore/gnunet-service-datastore.c | 20 ++++++++++++++++---- src/datastore/perf_datastore_api.c | 2 +- src/datastore/test_datastore_api_data.conf | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index cedad3649..77047dc8a 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c @@ -276,6 +276,11 @@ expired_processor (void *cls, return GNUNET_SYSERR; } plugin->api->next_request (next_cls, GNUNET_NO); +#if DEBUG_DATASTORE + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Deleting content that expired %llu ms ago\n", + (unsigned long long) (now.value - expiration.value)); +#endif return GNUNET_NO; /* delete */ } @@ -345,6 +350,12 @@ manage (void *cls, *need -= size + GNUNET_DATASTORE_ENTRY_OVERHEAD; plugin->api->next_request (next_cls, (0 == *need) ? GNUNET_YES : GNUNET_NO); +#if DEBUG_DATASTORE + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Deleting %llu bytes of low-priority content (still trying to recover %llu bytes)\n", + size + GNUNET_DATASTORE_ENTRY_OVERHEAD, + *need); +#endif return GNUNET_NO; } @@ -366,6 +377,11 @@ manage_space (unsigned long long need) { unsigned long long *n; +#if DEBUG_DATASTORE + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Asked to recover %llu bytes of cache space\n", + need); +#endif n = GNUNET_malloc (sizeof(unsigned long long)); *n = need; plugin->api->iter_low_priority (plugin->api->cls, @@ -416,10 +432,6 @@ transmit_callback (void *cls, tcc->tc (tcc->tc_cls, GNUNET_OK); if (GNUNET_YES == tcc->end) { -#if DEBUG_DATASTORE - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Request completed, ready for the next request!\n"); -#endif GNUNET_SERVER_receive_done (tcc->client, GNUNET_OK); } else diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index d488cef4c..5a966358d 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c @@ -380,7 +380,7 @@ main (int argc, char *argv[]) GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-datastore"); GNUNET_log_setup ("perf-datastore-api", #if VERBOSE - "DEBUG", + "DEBUG", #else "WARNING", #endif diff --git a/src/datastore/test_datastore_api_data.conf b/src/datastore/test_datastore_api_data.conf index 849c322c9..815bce0b8 100644 --- a/src/datastore/test_datastore_api_data.conf +++ b/src/datastore/test_datastore_api_data.conf @@ -10,7 +10,7 @@ BINARY = gnunet-service-datastore ACCEPT_FROM = 127.0.0.1; ACCEPT_FROM6 = ::1; ALLOW_SHUTDOWN = YES -QUOTA = 1000000 +QUOTA = 10000000 BLOOMFILTER = $SERVICEHOME/fs/bloomfilter DATABASE = sqlite # USERNAME = -- 2.25.1