[mnet-devel] Ickle me, pickle me, tickle me too...

Jim McCoy mccoy at mad-scientist.com
Fri Aug 8 23:28:18 BST 2003


On Friday, August 8, 2003, at 02:26 PM, Zooko wrote:
>
> If there is an entry in the index which no longer exists in the store 
> [...]

Forgot about that one.  I will think about it a bit. My first 
suggestion would be to return to the realm of random algorithms...

Every time T, run the following:

def index_check():
	checktargets = []
	while len(checktargets) < 128:
		entry_number = random.randrange(1, self.total_ids)
		checktargets.append(self.index_db.keys[entry_number]
	for target in checktargets:
		if not self._backend.read_location(self.__get_block_location(target)):
			self.__update_index_entry(target, None)
			self._total_ids = self._total_ids - 1

[it might be necessary to add a defrag_in_progress flag to _backend so 
that read_location does not happen while defrag is moving a block.]			

> the localblockstore could be required to have an unambiguous flag 
> indicating
> whether a location is occupied, and deletion requires first unsetting 
> that
> flag, then removing the index entry.

Doesn't this require the blockstore knowing all of the possible 
"locations"? Not too hard for storeflat (although not quite as easy as 
you are suggesting) but for storehash et al. it would seem to be a bit 
more work. Personally I am in favor of ejecting all of the other stores 
in favor of storeflat and similar variants yet to come, but this seems 
to require the sort of knowledge about what is happening inside the 
black box on the part of the localblockstore that makes the hair on the 
back of my neck stand up...

Jim



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel




More information about the Mnet-devel mailing list