Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADDED] Multiple routes and ability to have per-account routes #4001

Merged
merged 6 commits into from Apr 3, 2023

Commits on Apr 3, 2023

  1. [ADDED] Multiple routes and ability to have per-account routes

    New configuration fields:
    ```
    cluster {
       ...
       pool_size: 5
       accounts: ["A", "B"]
    }
    ```
    
    The configuration `pool_size` in the example above means that this
    server will create 5 routes to a remote server, assuming that that
    server has the same `pool_size` setting.
    
    Accounts (which are not part of the `accounts[]` configuration)
    are assigned a specific route in this pool, and this will be the
    same route on all servers in the cluster.
    
    Accounts that are defined in the `accounts` field will each have
    a dedicated route connection. This will allow suppression of the
    account name in some of the route protocols, reducing bytes transmitted
    which may increase performance.
    
    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    105237c View commit details
    Browse the repository at this point in the history
  2. Cleanup use of s.opts and fixed some lock (deadlock/inversion) issues

    One should not access s.opts directly but instead use s.getOpts().
    Also, server lock needs to be released when performing an account
    lookup (since this may result in server lock being acquired).
    A function was calling s.LookupAccount under the client lock, which
    technically creates a lock inversion situation.
    
    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    bd1b7b8 View commit details
    Browse the repository at this point in the history
  3. Fixed accounts configuration reload

    Issues could manifest with subscription interest not properly
    propagated.
    
    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    fe5d6be View commit details
    Browse the repository at this point in the history
  4. MQTT: Fixed issue that could cause time out storing messages

    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    3d49543 View commit details
    Browse the repository at this point in the history
  5. Fixed callout tests that were not doing cleanup causing data races

    Because of the lack of `defer ac.Cleanup()` in some tests, the
    accounts would still try to send conn updates, which was possibly
    causing data races with some of the tests that change the
    eventsHBInterval global variable.
    
    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    b32d6b4 View commit details
    Browse the repository at this point in the history
  6. Changes based on code review

    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    83c5c01 View commit details
    Browse the repository at this point in the history