[ARVADOS] updated: a46654d0507761feea8fb89abb4c9b64072a189b
git at public.curoverse.com
git at public.curoverse.com
Mon Aug 25 20:58:53 EDT 2014
Summary of changes:
sdk/python/arvados/keep.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
via a46654d0507761feea8fb89abb4c9b64072a189b (commit)
via 5d1c61fcdb7f589c6782cc9a0ebf0708ff1fe034 (commit)
from dca92e413653e0906179ec0ab929693c8514df23 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit a46654d0507761feea8fb89abb4c9b64072a189b
Author: Brett Smith <brett at curoverse.com>
Date: Mon Aug 25 20:58:37 2014 -0400
3147: Fix unwanted integer division in KeepClient logs.
diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index e75d64e..651cec4 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -243,9 +243,9 @@ class KeepClient(object):
self.last_result = result
self.success_flag = retry.check_http_response_success(result)
content = result[1]
- _logger.info("%s response: %s bytes in %s msec (%s MiB/sec)",
+ _logger.info("%s response: %s bytes in %s msec (%.3f MiB/sec)",
self.last_status(), len(content), t.msecs,
- (len(content)/(1024*1024))/t.secs)
+ (len(content)/(1024.0*1024))/t.secs)
if self.success_flag:
resp_md5 = hashlib.md5(content).hexdigest()
if resp_md5 == locator.md5sum:
commit 5d1c61fcdb7f589c6782cc9a0ebf0708ff1fe034
Author: Brett Smith <brett at curoverse.com>
Date: Mon Aug 25 20:58:08 2014 -0400
3147: Fixup KeepClient comments.
Per review.
diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index b9aa9db..e75d64e 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -529,10 +529,10 @@ class KeepClient(object):
@staticmethod
def _check_loop_result(result):
# KeepClient RetryLoops should save results as a 2-tuple: the
- # actual result of the request, and the number of servers that
- # received the request.
+ # actual result of the request, and the number of servers available
+ # to receive the request this round.
# This method returns True if there's a real result, False if
- # there are no more servers receiving the request, otherwise None.
+ # there are no more servers available, otherwise None.
if isinstance(result, Exception):
return None
result, tried_server_count = result
@@ -615,6 +615,8 @@ class KeepClient(object):
# No servers fulfilled the request. Count how many responded
# "not found;" if the ratio is high enough (currently 75%), report
# Not Found; otherwise a generic error.
+ # Q: Including 403 is necessary for the Keep tests to continue
+ # passing, but maybe they should expect KeepReadError instead?
not_founds = sum(1 for ks in roots_map.values()
if ks.last_status() in set([403, 404, 410]))
if roots_map and ((float(not_founds) / len(roots_map)) >= .75):
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list