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 <[email protected]>
---
 lib/rpc/transport.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/rpc/transport.py b/lib/rpc/transport.py
index 0350fa2..8271016 100644
--- a/lib/rpc/transport.py
+++ b/lib/rpc/transport.py
@@ -223,8 +223,7 @@ class Transport:
     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:
-- 
2.6.0.rc2.230.g3dd15c0

Reply via email to