This reverts commit
84c17185ad47070944c64ab64a8c7dfd60a260f9.
We use RetryOnNetworkError for basically every form of internal
communication. While it makes sense to retry---given that we
assume daemons might come and go at any time---we can only do
so safely, if we positively know that we did not cause any
side effect. Given that not all our requests are idempotent
(e.g., submitting jobs is not)---in fact, the majority is
not--, retrying on timeouts is not safe.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>
for try_no in range(0, retries):
try:
return fn(try_no)
- except (socket.error, errors.ConnectionClosedError,
- errors.TimeoutError) as ex:
+ except (socket.error, errors.ConnectionClosedError) as ex:
on_error(ex)
# we retry on a network error, unless it's the last try
if try_no == retries - 1: