]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
helper: remove timings["existence_check"], aka "Already-In-Grid Check"
authorBrian Warner <warner@lothar.com>
Tue, 22 May 2012 04:13:11 +0000 (21:13 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 22 May 2012 04:13:11 +0000 (21:13 -0700)
This measured how long the Helper took to do a filecheck before asking
for ciphertext. The "Contacting Helper" report includes both
existence_check and the client-helper RTT.

For non-overlapping uploads, it was being returned correctly. But when
multiple upload requests overlapped, and the file was not already in the
grid, the filecheck would only run once, and its existence_check time
would be reported for all uploaders (even if they didn't have to wait
for that time). Cleaning that up proved too difficult: the only correct
place to report this time is from the initial remote_upload_chk() call,
but the return value of that is too constrained to accomodate it in the
needs-upload case.

So I'm removing it altogether. Eventually I plan to add a proper
events/times field and record more data, including this check, in a form
that can be drawn on a nice zoomable timeline view.

Old clients talking to a new Helper (which doesn't supply the value)
will tolerate the loss (they'll just display an empty field on the web
view).

src/allmydata/immutable/offloaded.py
src/allmydata/interfaces.py
src/allmydata/web/status.py
src/allmydata/web/upload-results.xhtml
src/allmydata/web/upload-status.xhtml

index 02b1386e41f0a20a8d197c40074ebd2030dd036d..7ff19c38a44304c922688fafc976537ec33ac2d0 100644 (file)
@@ -567,7 +567,6 @@ class Helper(Referenceable):
     def remote_upload_chk(self, storage_index):
         self.count("chk_upload_helper.upload_requests")
         r = upload.UploadResults()
-        started = time.time()
         si_s = si_b2a(storage_index)
         lp = self.log(format="helper: upload_chk query for SI %(si)s", si=si_s)
         incoming_file = os.path.join(self._chk_incoming, si_s)
@@ -579,8 +578,6 @@ class Helper(Referenceable):
 
         d = self._check_for_chk_already_in_grid(storage_index, r, lp)
         def _checked(already_present):
-            elapsed = time.time() - started
-            r.timings['existence_check'] = elapsed
             if already_present:
                 # the necessary results are placed in the UploadResults
                 self.count("chk_upload_helper.upload_already_present")
index a73ce8602acd182c50ff87d7379b23a4fd3e5675..5f6f8388f77add84f586742df3b4842242f648ef 100644 (file)
@@ -1948,7 +1948,6 @@ class IUploadResults(Interface):
        storage_index : time to compute the storage index
        peer_selection : time to decide which peers will be used
        contacting_helper : initial helper query to upload/no-upload decision
-       existence_check : helper pre-upload existence check
        helper_total : initial helper query to helper finished pushing
        cumulative_fetch : helper waiting for ciphertext requests
        total_fetch : helper start to last ciphertext response
index 068e3a9f34ab2730933cf482766e05751e52b08c..a1df1029bf0d014ca253330221e712de1506d45f 100644 (file)
@@ -81,9 +81,6 @@ class UploadResultsRendererMixin(RateAndTimeMixin):
     def data_time_contacting_helper(self, ctx, data):
         return self._get_time("contacting_helper")
 
-    def data_time_existence_check(self, ctx, data):
-        return self._get_time("existence_check")
-
     def data_time_cumulative_fetch(self, ctx, data):
         return self._get_time("cumulative_fetch")
 
index 6c46118d87b86c2d1cb772277952326ebb731a47..fa8894dcdf146e449897d3542c513a9b817716c1 100644 (file)
@@ -24,9 +24,6 @@
       <li>Storage Index: <span n:render="time" n:data="time_storage_index" />
      (<span n:render="rate" n:data="rate_storage_index" />)</li>
       <li>[Contacting Helper]: <span n:render="time" n:data="time_contacting_helper" /></li>
-      <ul>
-        <li>[Helper Already-In-Grid Check]: <span n:render="time" n:data="time_existence_check" /></li>
-      </ul>
       <li>[Upload Ciphertext To Helper]: <span n:render="time" n:data="time_cumulative_fetch" />
      (<span n:render="rate" n:data="rate_ciphertext_fetch" />)</li>
 
index 2b4b7fa2bc19ff78a0d2dc3c335be291c79fa7c8..8aaecd47ad5a2000788973d6ca6cc64bd082b4d5 100644 (file)
@@ -36,9 +36,6 @@
         <li>Storage Index: <span n:render="time" n:data="time_storage_index" />
         (<span n:render="rate" n:data="rate_storage_index" />)</li>
         <li>[Contacting Helper]: <span n:render="time" n:data="time_contacting_helper" /></li>
-        <ul>
-          <li>[Helper Already-In-Grid Check]: <span n:render="time" n:data="time_existence_check" /></li>
-        </ul>
         <li>[Upload Ciphertext To Helper]: <span n:render="time" n:data="time_cumulative_fetch" />
         (<span n:render="rate" n:data="rate_ciphertext_fetch" />)</li>