[mnet-devel] patch: eliminate a "-1"

Zooko O'Whielacronx zooko at zooko.com
Tue Feb 17 16:04:19 GMT 2004


A long time ago I added this "-1" here.  I just looked at it with cvs annotate 
and cvs log, and I don't know why I did this.  My cvs log entry just says "fix 
bug in blockwrangler".  I committed other bugfixes in that same patch, so 
I think that this was just a mistake.  Looking at the code I don't think the -1 
is right.  This only comes up in the case of badluckblock workaround, and only 
sometimes in that case.  I think the only harm caused by the -1 is that it might 
make us go fetch one block remotely when we could have gotten it from the cache.

Regards,

Zooko

--- common/BlockWrangler.py	2004-02-17 10:50:05.000000000 -0500
+++ common/BlockWrangler.py	2004-02-17 10:50:16.000000000 -0500
@@ -598,7 +598,7 @@
             newchunkobj = ChunkObj.ChunkObj(chunkobj.chunkmap, chunkobj.fileobjs, test_decrypt_func=self._test_decrypt_func, test_chunk_integrity_check_func=self._test_integrity_check_func, no_rebuilder=hasattr(self, "_is_verifier"))
             self.data.add_chunkobj(newchunkobj)
             assert self.data._assert_consistency()
-            self.request_blocks_from_cache(newchunkobj.get_Ids_of_unused_blocks(), chunkobj.chunkmap.numneeded-1)
+            self.request_blocks_from_cache(newchunkobj.get_Ids_of_unused_blocks(), chunkobj.chunkmap.numneeded)
             self.strategy.schedule_event()
             return
 


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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