BUG-8515: make sure we retry connection on NotLeaderException 51/57951/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 29 May 2017 08:40:06 +0000 (10:40 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 29 May 2017 08:57:29 +0000 (10:57 +0200)
There is a race window when we are establishing connection to the
backend:

When we received the pointer to shard leader, we send a connect
request, but during that time window the leader may move, resulting
in a NotLeaderException response to ConnectClientRequest. Since
we are in reconnection mode, this will result in hard abort of
connection.

Fix this by wrapping NotLeaderException and akka failures in a
TimeoutException -- hence we will retry connecting.

Change-Id: Ia5d1915d59e80a70c54302c1790121d0767ff08a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>

No differences found