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 a condition where JetStream assets could be created in multiple leafnode domains. #2529

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

derekcollison
Copy link
Member

Also added in optional Domain to StreamInfo.

Signed-off-by: Derek Collison derek@nats.io

/cc @nats-io/core

… leafnodes.

Also added in optional Domain to StreamInfo.

Signed-off-by: Derek Collison <derek@nats.io>
Copy link
Contributor

@matthiashanel matthiashanel left a comment

Choose a reason for hiding this comment

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

LGTM, but one question.

Comment on lines 1077 to +1082
if accHasJS {
s.addInJSDenyExport(remote)
// If we specified a domain do not import by default.
if hasJSDomain {
s.addInJSDenyImport(remote)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This works, but I have one question about this. Why is it that this is guarded by accHasJs?

If a downstream server (say through another leaf node hop) has no JS enabled, adding a deny should not matter as there is no interest on that end.
If such an account does have JS enabled, then there, presumably we would add the deny. Meaning a deny earlier on shouldn't matter either.

What am I missing?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need the deny unless the account has JS enabled (not the server), so just trying to keep it small (the deny stuff).

Not sure that answers your question though..

Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

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

Will defer to Matthias that knows way more than me on that subject...

@derekcollison derekcollison merged commit 777e323 into main Sep 14, 2021
@derekcollison derekcollison deleted the ln-js-domains branch September 14, 2021 22:25
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.

3 participants