[CHANGED] Gateway: Switch all accounts to interest-only mode

We are phasing out the optimistic-only mode. Servers accepting
inbound gateway connections will switch the accounts to interest-only
mode.

The servers with outbound gateway connection will check interest
and ignore the "optimistic" mode if it is known that the corresponding
inbound is going to switch the account to interest-only. This is
done using a boolean in the gateway INFO protocol.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2022-08-19 16:41:44 -06:00
parent 6bf50dbb77
commit f6c4e5fcee
7 changed files with 453 additions and 127 deletions

View File

@@ -2665,6 +2665,9 @@ func TestLeafNodeSwitchGatewayToInterestModeOnly(t *testing.T) {
// route connections to simulate.
func TestLeafNodeResetsMSGProto(t *testing.T) {
server.GatewayDoNotForceInterestOnlyMode(true)
defer server.GatewayDoNotForceInterestOnlyMode(false)
opts := testDefaultOptionsForLeafNodes()
opts.Cluster.Name = "xyz"
opts.Cluster.Host = opts.Host