aboutsummaryrefslogtreecommitdiff
path: root/src/datastore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-19 09:32:53 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-19 09:32:53 +0000
commit4cf87d6c3b8c35e331183c7e582f0410eb5bdf5f (patch)
tree29cfe8df77eb0aa2077bb9c5cc9c179ce4fe3791 /src/datastore
parent115c600c4b5fc315d18087453f1cd5a6da148ff7 (diff)
downloadgnunet-4cf87d6c3b8c35e331183c7e582f0410eb5bdf5f.tar.gz
gnunet-4cf87d6c3b8c35e331183c7e582f0410eb5bdf5f.zip
fixing calculation of Bloom filter size that was too large by 1024x because it was not adjusted when the unit for the quota was changed from kb to bytes
Diffstat (limited to 'src/datastore')
-rw-r--r--src/datastore/gnunet-service-datastore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index e6f822c59..6adc1132d 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -1526,10 +1526,10 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1526 cache_size = quota / 8; /* Or should we make this an option? */ 1526 cache_size = quota / 8; /* Or should we make this an option? */
1527 GNUNET_STATISTICS_set (stats, gettext_noop ("# cache size"), cache_size, 1527 GNUNET_STATISTICS_set (stats, gettext_noop ("# cache size"), cache_size,
1528 GNUNET_NO); 1528 GNUNET_NO);
1529 if (quota / 32LL > (1 << 31)) 1529 if (quota / (32 * 1024LL) > (1 << 31))
1530 bf_size = (1 << 31); /* absolute limit: ~2 GB, beyond that BF just won't help anyway */ 1530 bf_size = (1 << 31); /* absolute limit: ~2 GB, beyond that BF just won't help anyway */
1531 else 1531 else
1532 bf_size = quota / 32; /* 8 bit per entry, 1 bit per 32 kb in DB */ 1532 bf_size = quota / (32 * / 1024LL); /* 8 bit per entry, 1 bit per 32 kb in DB */
1533 fn = NULL; 1533 fn = NULL;
1534 if ((GNUNET_OK != 1534 if ((GNUNET_OK !=
1535 GNUNET_CONFIGURATION_get_value_filename (cfg, "DATASTORE", "BLOOMFILTER", 1535 GNUNET_CONFIGURATION_get_value_filename (cfg, "DATASTORE", "BLOOMFILTER",