[Gluster-devel] One Question about DHT
Pavan T C
tcp at gluster.com
Wed Aug 17 09:38:27 UTC 2011
On Wednesday 17 August 2011 09:18 AM, Daniel wrote:
> Hello Pavan,
>
> I came cross one question about DHT lookup.
>
> When dht_lookup process a fresh lookup, if the looked up target can not
> be found by hashed, why does it assert it as a directory and lookup on
> all the child nodes?
Not sure why you thought I should be the one to address this to. There
are more knowledgeable engineers on this user group :)
I looked up the code a bit to answer your question and here is what I
understand:
If it is a fresh lookup and the file hash computed for this entity did
not fall into any of the pre-computed hashed ranges, a lookup_everywhere
is triggered to go to the backend and see if it exists there. If it is
not there too, this brings in a mechanism called "directory self heal".
The debug message does say - "see if it is a directory", but if you look
at the dht_lookup_dir_cbk, a check is also made to see if it was *not* a
directory. It might only be the debug messages that might have led you
into thinking why a directory is being looked up in particular. That is
not really the case.
Pavan
>
> Thanks
>
> Dan
>
More information about the Gluster-devel
mailing list