Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 20 14:04:19 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id mAKM4JXJ014017 for ; Thu, 20 Nov 2008 14:04:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id mAKM1flx023598 for ; Thu, 20 Nov 2008 14:01:41 -0800 Message-Id: <200811202201.mAKM1flx023598@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Doubt in Get Request Date: Thu, 20 Nov 2008 14:01:41 -0800 From: Bill Cheng Someone wrote: > So, suppose we have a copy in the files directory as 0.meta and 0.data, and > we request for a copy of the same file from another node, we flood the Get > Request and actually get the file from another node. > > So, now we have another copy as 1.data and 1.meta right?, also all our index > structures will have 2 entries for the same file copies, isnt it? > > Or, are we supposed to just maintain one copy and delete 1.meta and 1.data? The rule is that you must not store two files with the same FileName, SHA1, *and* Nonce in your node, no matter what! > I think, the case should be similar to the one, where we do a GET for the > same fileID twice. Are we supposed to keep both 0.* and 1.* ? > > Also for cached files, if we already have cached a file , we should not > cache it again, even if it passes through once many times. right? You should apply the same rule as above. -- Bill Cheng // bill.cheng@usc.edu On Thu, Nov 20, 2008 at 1:28 PM, Bill Cheng wrote: > Someone wrote: > > > We had a doubt regarding the Get command: > > Suppose, In a get request, we request for a file on another node. But, a > > copy of the same file(Filename, sha1, Nonce) exists on the current node. > > Then, should we just copy the local file, or do we have to flood a get > > request, so that the file becomes popular?? > > You must flood a GET message in this case for the reason you stated. > -- > Bill Cheng // bill.cheng@usc.edu