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

[FIXED] LeafNode: data race during validation and create leafnode #4194

Merged
merged 1 commit into from May 25, 2023

Conversation

kozlovic
Copy link
Member

The issue really was that the test was sharing remote options. The way options are used is not ideal since we reference the user provided options (but it is relied upon now in many tests and possibly users setups). The other side of the issue was that when no local account is specified in a "remote" specification, we set it to the global account, but that was done when creating the leafnode object (when soliciting), which in the case of the test could race with the second server doing the validation.

In this PR we move the setting to global account during the validation, but also fixed the tests to not share the remote options configuration slice between the two servers.

Resolves #4191

Signed-off-by: Ivan Kozlovic ivan@synadia.com

The issue really was that the test was sharing remote options. The
way options are used is not ideal since we reference the user provided
options (but it is relied upon now in many tests and possibly users
setups). The other side of the issue was that when no local account
is specified in a "remote" specification, we set it to the global
account, but that was done when creating the leafnode object (when
soliciting), which in the case of the test could race with the
second server doing the validation.

In this PR we move the setting to global account during the validation,
but also fixed the tests to not share the remote options configuration
slice between the two servers.

Resolves #4191

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic kozlovic requested a review from a team as a code owner May 25, 2023 00:07
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit 24d4bd6 into dev May 25, 2023
2 checks passed
@derekcollison derekcollison deleted the fix_4191 branch May 25, 2023 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants