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

Fix stream sourcing & mirroring overlap errors #4052

Merged
merged 1 commit into from Apr 14, 2023

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Apr 14, 2023

When adding or updating sources/mirrors, server was checking if the stream with a given name exists to check for subject overlaps, among other things.
However, if sourced/mirrored stream was External, checks should not be executed, as not only stream would never be found, but also, if External stream had the same name as the sourcing stream, the check would be wrongly performed against itself.

cc @jnmoyne

Signed-off-by: Tomasz Pietrek tomasz@nats.io

@Jarema Jarema requested a review from a team as a code owner April 14, 2023 17:18
server/jetstream_test.go Outdated Show resolved Hide resolved
server/jetstream_test.go Outdated Show resolved Hide resolved
server/stream.go Show resolved Hide resolved
When adding or updating sources/mirrors, server was checking if the stream with
a given name exists to check for subject overlaps, among other things.
However, if sourced/mirrored stream was `External`, checks should
not be executed, as not only stream would never be found,
but also, if `External` stream had the same name as the sourcing stream,
the check would be wrongly performed against itself.

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
@Jarema Jarema force-pushed the jarema-fix-stream-overlap-checks branch from 0de0888 to a66c67b Compare April 14, 2023 19:00
@derekcollison derekcollison self-requested a review April 14, 2023 19:11
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 2699465 into main Apr 14, 2023
2 checks passed
@derekcollison derekcollison deleted the jarema-fix-stream-overlap-checks branch April 14, 2023 19:18
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