Files
nats-server/server
Ivan Kozlovic df676b7c63 [FIXED] Race condition during implicit Gateway reconnection
Say server in cluster A accepts a connection from a server in
cluster B.
The gateway is implicit, in that A does not have a configured
remote gateway to B.
Then the server in B is shutdown, which A detects and initiate
a single reconnect attempt (since it is implicit and if the
reconnect retries is not set).
While this happens, a new server in B is restarted and connects
to A. If that happens before the initial reconnect attempt
failed, A will register that new inbound and do not attempt to
solicit because it has already a remote entry for gateway B.
At this point when the reconnect to old server B fails, then
the remote GW entry is removed, and A will not create an outbound
connection to the new B server.

We fix that by checking if there is a registered inbound when
we get to the point of removing the remote on a failed implicit
reconnect. If there is one, we try the reconnection.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-08-27 14:36:54 -06:00
..
2019-10-15 23:55:13 +08:00
2020-02-25 19:53:09 -05:00
2020-02-25 19:53:09 -05:00
2020-04-14 13:27:17 -06:00
2020-04-14 09:26:35 -07:00
2019-05-06 15:41:38 -07:00
2019-12-12 11:58:24 -07:00
2018-12-06 15:09:14 -08:00
2019-12-12 11:58:24 -07:00
2020-03-13 21:06:30 -04:00
2019-05-10 15:11:30 -07:00
2018-10-06 14:06:14 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2018-03-15 22:31:07 -07:00
2019-11-14 20:05:32 -07:00
2019-11-14 20:05:32 -07:00
2019-12-12 11:58:24 -07:00
2019-01-18 10:54:04 +08:00