[chord] More questions

Frank Dabek fdabek at MIT.EDU
Sun Jun 6 17:38:27 EDT 2004



adrian at softnet.tuc.gr wrote:
> Hi,
> 
> I stuck again, and I have some questions :
> 
> 1) The return value of compute_hash(buf,d) is indepented from my hostname?
>     If I call it from anoter computer, could it has the same value?
> 
> 
Yes. It will have the same value. In the future, please try to consult 
the source code before asking questions like this. The function in 
question is only six semi-colons long.

> 2) In test_types.C, If don't use PUB_KEY, I need sfsconst_init() and
>     srandom(seed) ?
> 
> 

I'm confused by your question. Are you modifying test_types? Since 
random () is never called in test_types.C you can safely remove the 
srandom. If you don't use any of SFS's filesystem code (NFS loopback 
servers, for instance) you probably don't need the const_init either.

> 3) I use NOAUTH type(thanks for previous explanations on dhash_ctype) and I
>     store data(a string like "my name is") with a key e.x. bigint(10).
> After it is
>     stored, I might want to change my data to "my name is adrian".
>     Is it possible to do it and the key will remain the same?
> 

Yes, the key will be unchanged. NO_AUTH does not enfoce a relationship 
between keys and data.

>     I ask this, because I run dhash.append(...) in test_types.C but I
> don't see
>     any changes to my initial data. I run :
>         warn << "data (" << blk->len << " bytes) was " << str(blk->data,
> blk->len) << "\n";
>    in fetch_cb_append() and fetch_cb_append_second() and I always see
>    the same result in my screen.
>          typetest: data (23 bytes) was This is some test data
>          typetest: data (23 bytes) was This is some test data
> 
>    Moreover, I add '+ 1' in length of data of in
>          dash.append(key,data,strlen(data)+1, ...)
> 

There seems to be a bug in the append code. I'll take a look at it.

--Frank
> 
> Thanks,
> Adrian.
> 
> 
> _______________________________________________
> chord mailing list
> chord at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/chord



More information about the chord mailing list