Cherry-picks for 2.10.23-RC.4#6162
Merged
neilalexander merged 14 commits intorelease/v2.10.23from Nov 22, 2024
Merged
Conversation
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
…rStream/monitorConsumer Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Match the check of the backoff and maxDeliver configs with the official documentation https://docs.nats.io/nats-concepts/jetstream/consumers#:~:text=The%20sequence%20length,MaxDelivery
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Previous behaviour of checking interface is `nil` didn't do the right thing as a `nil` parameter could still be wrapped in an interface descriptor that itself would be non-`nil`, so use reflection instead. Signed-off-by: Neil Twigg <neil@nats.io>
There were various things wrong with this test: 1. The routes between S1 and S2 were only slow in one direction 2. The stream listened for one subject and then the publisher published on another 3. The final `checkFor` didn't wait to see if all of the messages had even been processed before going on to check preack state Signed-off-by: Neil Twigg <neil@nats.io>
This adds support for reply subjects on forwarded proposals, so we can know whether or not a leader has acted upon those proposals yet. The `ForwardProposal` function does NOT yet use this functionality as we cannot know in a mixed-version or upgrade scenario yet if the remote side will be able to respond. Signed-off-by: Neil Twigg <neil@nats.io>
There were multiple issues, but basically the fact that we would not store the routed subscriptions with the origin of the LEAF they came from made the server unable to differentiate those compared to "local" routed subscriptions, which in some cases (like a server restart and the resend of subscriptions) could lead to servers sending incorrectly subscription interest to leaf connections. We are now storing the subscriptions with a sub type indicator and the origin (for leaf subscriptions) as part of the key. This allows to differentiate "regular" routed subs versus the ones on behalf of a leafnode. An INFO boolean is added `LNOCU` to indicate support for origin in the `LS-` protocol, which is required to properly handle the removal. Therefore, if a route does not have `LNOCU`, the server will behave like an old server, and store with the key that does not contain the origin, so that it can be removed when getting an LS- without the origin. Note that in the case of a mix of servers in the same cluster, some of the issues this PR is trying to fix will be present (since the server will basically behave like a server without the fix). Having a different routed subs for leaf connections allow to revisit the fix #5982 that was done for issue #5972, which was about a more fair queue distribution to a cluster of leaf connections. That fix actually introduced a change in that we always wanted to favor queue subscriptions of the cluster where the message is produced, which that fix possibly changed. With this current PR, the server can now know if a remote queue sub is for a "local" queue sub there or on behalf of a leaf and therefore will not favor that route compared to a leaf subscription that it may have directly attached. Resolves #5972 Resolves #6148 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This file contains hidden or 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
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.
Includes:
o.Update(state)consistent for file and mem & fixed int underflow #6147InstallSnapshotduring shutdown, would race withmonitorStream/monitorConsumer#6153UpdateDeliveredwith quorum when clustered #6139require_NotNil#6152Signed-off-by: Neil Twigg neil@nats.io