8281: Fix KeepClient retry bugs.
authorTom Clegg <tom@curoverse.com>
Thu, 21 Jan 2016 19:35:34 +0000 (14:35 -0500)
committerTom Clegg <tom@curoverse.com>
Thu, 21 Jan 2016 21:11:36 +0000 (16:11 -0500)
commitde9e183ceac9e5dc53cd4fbd089b752a75a4d5cf
treeb34c7f5a794ddd2d16c91ba9f6fd5cbb4b7310fa
parentb73a5d296669ae58c8cd5a7d2e1aedd19f0c0029
8281: Fix KeepClient retry bugs.

get() and put() were both handling all Curl exceptions -- including
timeouts -- by marking the keep service as unusable. For example, if a
single proxy is the only service available, a single timeout was
fatal. This is fixed by setting the retry loop status to None instead
of False after curl exceptions.

put() was repeating its retry loop until it achieved the desired
number of replicas _in a single iteration_. For example, when trying
to store 2 replicas, 6 loop iterations with a single success in each
iteration would result in 6 copies being stored but put() declaring
failure. This is fixed by checking against a cumulative "done" counter
instead of the "copies done in this loop iteration" counter.
sdk/python/arvados/keep.py
sdk/python/tests/test_keep_client.py
services/fuse/tests/test_retry.py