[chord] libadb::remove

Emil Sit sit at MIT.EDU
Mon Jun 23 22:59:21 EDT 2008


On Thu, 08 May 2008 at 17:56 (-0400), Tung Thanh Nguyen wrote:
> I am working on adding a new funtion which need to remove a stored
> block from the Chord. I noticed that there's a method adb::remove on
> your libadb.C. However, when I invoked this method, I got an error in
> the "assert (!hasaux_);" statement. What does this "hasaux_" property
> mean? Is it used to maintain the consistency between stored
> blocks/fragments (replicas)contained in different chord nodes? 

Chord/DHash uses "aux"iliary information to distinguish between
versions of public key objects or sub-objects of noauth objects;
that is, aux information distinguishes objects that otherwise have
identical keys.  Content hash objects do not need aux information
because objects that have identical keys have, by definition,
identical data.

The database backend adbd stores objects of each content
type in a separate database.  To ensure that content types
that require aux data remain separate from those that do not,
adb proxy objects are designated at initialization to either
hasaux_ or not hasaux_.  Code that expects to operate on
keys must use the correct version of access methods
(store/remove/fetch).

The fact that your code triggers the assertion suggests you are
using the aux-friendly remove method on an adb object that was
initialized to not have aux.

-- 
Emil Sit / MIT CSAIL PDOS / http://pdos.csail.mit.edu/chord/  



More information about the chord mailing list