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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! Few minor comments. Thanks again!
5ae156b
to
b907112
Compare
@derekcollison I have updated the PR with 2 commits, one addressing your comments, the second fixes some tests that missed some cleanup code that caused possibly other tests to fail. However, I find that the following test is often failing (even on my machine, macOS bare metal):
This is true even in More worrisome, is this test:
It passes 10/10 on |
I am working on the RaceBug test and why it is failing on dev, I am close to having a PR so do not worry about that one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
For the test fixes, possibly to do those on main and we can inherit them or do separate PR for them on main?
For the tests, done in: #4005 |
e4d78a0
to
bf0df0d
Compare
@derekcollison I cherry-picked the tests fixes an submitted the PR to main, which was approved by @wallyqs and merged into main, then into dev and I have rebased this PR out of dev, which dropped 3 commits that were now upstream. |
@kozlovic could you fix conflicts? Apologies was most likely from my fix to dev branch just now. As soon as its cleared will merge. |
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>
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>
Issues could manifest with subscription interest not properly propagated. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
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>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
bf0df0d
to
83c5c01
Compare
@derekcollison I have rebased and fixed conflicts and run on Travis is green. |
This is a fix for PR #4001. If a server has an s2_auto configuration, the compression level needs to be updated based on the RTT, however, this should not happen if a particular route is actually not using compression, either because it is a connection to an older server or the other side has explicitly configure compression to be "off". Extended a test that would have caught this issue. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This is a rework of incorrect changes made in PR #4001. This affects only the `dev` branch. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This is a rework of incorrect changes made in PR #4001. This affects only the `dev` branch. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This is a rework of incorrect changes made in PR #4001. Changes did not work for changes to export permissions. Test was modified to add export changes. This affects only the `dev` branch. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
New configuration fields:
The configuration
pool_size
in the example above means that thisserver 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 havea 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