Author: j16sdiz
Date: 2008-05-23 16:29:00 +0000 (Fri, 23 May 2008)
New Revision: 20068
Modified:
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
use salted key for bloom filter
Modified:
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
---
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
2008-05-23 16:12:24 UTC (rev 20067)
+++
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
2008-05-23 16:29:00 UTC (rev 20068)
@@ -121,7 +121,7 @@
StorableBlock block =
entry.getStorableBlock(routingKey, fullKey);
incHits();
if (updateBloom && !checkBloom)
- bloomFilter.updateFilter(routingKey);
+
bloomFilter.updateFilter(getDigestedRoutingKey(routingKey));
return block;
} catch (KeyVerifyException e) {
Logger.minor(this, "key verification exception", e);
@@ -140,7 +140,7 @@
*/
private Entry probeEntry(byte[] routingKey) throws IOException {
if (checkBloom)
- if (!bloomFilter.checkFilter(routingKey))
+ if
(!bloomFilter.checkFilter(getDigestedRoutingKey(routingKey)))
return null;
Entry entry = probeEntry0(routingKey, storeSize);
@@ -205,7 +205,7 @@
// Overwrite old offset
if (updateBloom)
- bloomFilter.updateFilter(routingKey);
+
bloomFilter.updateFilter(getDigestedRoutingKey(routingKey));
Entry entry = new Entry(routingKey, header, data);
writeEntry(entry, oldOffset);
incWrites();
@@ -228,7 +228,7 @@
if (logDEBUG)
Logger.debug(this, "probing,
write to i=" + i + ", offset=" + offset[i]);
if (updateBloom)
-
bloomFilter.updateFilter(routingKey);
+
bloomFilter.updateFilter(getDigestedRoutingKey(routingKey));
writeEntry(entry, offset[i]);
incWrites();
return;
@@ -247,7 +247,7 @@
if (logDEBUG)
Logger.debug(this, "collision, write to i=0,
offset=" + offset[0]);
if (updateBloom)
- bloomFilter.updateFilter(routingKey);
+
bloomFilter.updateFilter(getDigestedRoutingKey(routingKey));
writeEntry(entry, offset[0]);
incWrites();
} finally {