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] JetStream: stream sources issue in mixed mode clusters #3061

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Apr 20, 2022

The main issue was that in mixed-mode, the interest through gateway
may still be in optimistic mode, which when creating the source
consumer would start delivery before we had a chance to setup
the subscription to receive those messages.

The approach is to create the subscription prior to sending
the consumer create request. Also refactored a bit the code in
the hope to make the retries a bit more bullet proof.

We may also look at making sure that gateways are switched to
interest-mode when detecting a mixed-mode setup.

Also fixed a defect that could cause a source to be canceled
when updating a stream.

Resolves #2801

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

@kozlovic
Copy link
Member Author

@derekcollison Will likely apply the same fixes to the mirror case in a separate PR.

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

@kozlovic kozlovic force-pushed the js_fix_stream_source branch 2 times, most recently from aad92c9 to 843d35e Compare April 21, 2022 02:38
The main issue was that in mixed-mode, the interest through gateway
may still be in optimistic mode, which when creating the source
consumer would start delivery before we had a chance to setup
the subscription to receive those messages.

The approach is to create the subscription prior to sending
the consumer create request. Also refactored a bit the code in
the hope to make the retries a bit more bullet proof.

We may also look at making sure that gateways are switched to
interest-mode when detecting a mixed-mode setup.

Also fixed a defect that could cause a source to be canceled
when updating a stream.

Resovles #2801

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
kozlovic added a commit that referenced this pull request Apr 21, 2022
Similar to PR #3061

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
kozlovic added a commit that referenced this pull request Apr 21, 2022
Similar to PR #3061

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@derekcollison derekcollison self-requested a review April 21, 2022 05:09
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!

@kozlovic kozlovic merged commit df61a33 into main Apr 21, 2022
@kozlovic kozlovic deleted the js_fix_stream_source branch April 21, 2022 05:20
kozlovic added a commit that referenced this pull request Apr 21, 2022
Similar to PR #3061

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
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.

Stream editing with external source cause message multiplying in target stream
2 participants