On Sun, Jul 13, 2008 at 3:13 AM, Matthew Toseland
<toad at amphibian.dyndns.org> wrote:
> On Thursday 05 June 2008 16:31, j16sdiz at freenetproject.org wrote:
>> Author: j16sdiz
>> Date: 2008-06-05 15:31:35 +0000 (Thu, 05 Jun 2008)
>> New Revision: 20219
>>
>> Modified:
>>
> branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
>> Log:
>> fix key count on overwrite
>>
>>
>> Modified:
> branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
>> ===================================================================
>> ---
> branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
> 2008-06-05 15:31:08 UTC (rev 20218)
>> +++
> branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
> 2008-06-05 15:31:35 UTC (rev 20219)
>> @@ -229,11 +229,8 @@
>>                                       }
>>
>>                                       // Overwrite old offset
>> -                                     if (updateBloom)
>> -                                             
>> bloomFilter.updateFilter(getDigestedRoutingKey(routingKey),
> syncBloom);
>>                                       Entry entry = new Entry(routingKey, 
>> header, data);
>> -                                     writeEntry(entry, oldOffset);
>> -                                     writes.incrementAndGet();
>> +                                     writeEntry(entry, oldOffset); // 
>> overwrite, don't increase keyCount
>>                                       return;
>>                               }
>
> Did you mean to not update the bloom filter here? Why?
>

This is the key collision case, with overwrite = true (see the javadoc
for FreenetStore#put).
The routing key is in the bloom filter already.

Reply via email to