[chord] Does DHASH_NOAUTH work?

Emil Sit sit at MIT.EDU
Fri Aug 31 11:30:07 EDT 2007


Cześć Patryk,

On Sun, 26 August 2007 at 05:00 (+0200), Patryk Ściborek wrote:
> With first 3 steps I don't have any problems. Insert/Retrieve callbacks
> always have dhash_stat set to DHASH_OK.
> Problems begin in step 4 - Retrieve callback have dhash_stat parameter
> set to DHASH_OK but dhash_block is empty (bl->data.len()==0)! I don't
> have any idea why :(

NOAUTH should indeed work with the snapshot you are using.
Unfortunately, the API is not well documented.   The reason data.len ()
is 0 is because NOAUTH writes are returned in a vector (bl->vData).  

The rationale for doing this is that DHash does not want to be
responsible for merging writes or verifying versions for NOAUTH objects.
This problem would arise if, for example, the node responsible for an
object is temporarily offline during a write; when it returns, something
must combine the old version with the new version that the other
replicas received.  Since the best way to do that may be application
dependent, DHash simply stacks all the writes together in a vector
and leaves it for the application to interpret that as it chooses.

Code examples for how to use the different content type is in the file
tools/dbm.C.  Look at the implementation of noauth_harness_t::verify_one.

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



More information about the chord mailing list