-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kozlovic
force-pushed
the
js_fix_stream_source
branch
from
April 20, 2022 17:53
8d0a94a
to
3d85e9b
Compare
@derekcollison Will likely apply the same fixes to the mirror case in a separate PR. |
kozlovic
force-pushed
the
js_fix_stream_source
branch
from
April 20, 2022 19:49
3d85e9b
to
a817c87
Compare
derekcollison
approved these changes
Apr 20, 2022
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
kozlovic
force-pushed
the
js_fix_stream_source
branch
2 times, most recently
from
April 21, 2022 02:38
aad92c9
to
843d35e
Compare
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
force-pushed
the
js_fix_stream_source
branch
from
April 21, 2022 03:02
843d35e
to
9975a38
Compare
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
approved these changes
Apr 21, 2022
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!
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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