Skip to content

Comments

[FIXED] JetStream leaks subs with overlapping stream import#7720

Merged
neilalexander merged 1 commit intomainfrom
maurice/si-leaked-subs
Jan 13, 2026
Merged

[FIXED] JetStream leaks subs with overlapping stream import#7720
neilalexander merged 1 commit intomainfrom
maurice/si-leaked-subs

Conversation

@MauriceVanVeen
Copy link
Member

Given a clustered setup where two accounts use stream imports/exports which overlap the $JS.> subject hierarchy, any servers that didn't host the stream/consumer asset would be made aware of this through 'shadow subs' due to the stream import. However, these weren't cleaned up during unsubscribing if the stream/consumer was deleted, leading to essentially leaking these subscriptions.

We'll now also update the routes if we had 'shadow subs' for the internal JetStream client.

Resolves #7718

Signed-off-by: Maurice van Veen github@mauricevanveen.com

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen marked this pull request as ready for review January 13, 2026 14:48
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner January 13, 2026 14:48
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

Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

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

LGTM

@neilalexander neilalexander merged commit b72becc into main Jan 13, 2026
89 of 92 checks passed
@neilalexander neilalexander deleted the maurice/si-leaked-subs branch January 13, 2026 15:20
neilalexander added a commit that referenced this pull request Jan 15, 2026
Includes the following:

- #7704
- #7708
- #7710
- #7709
- #7712
- #7716
- #7720
- #7721
- #7723
- #7728

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Jan 15, 2026
Includes the following:

- #7704
- #7708
- #7710
- #7711
- #7709
- #7712
- #7716
- #7720
- #7721
- #7723
- #7728

Signed-off-by: Neil Twigg <neil@nats.io>
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.

Subscription accumulation with OrderedConsumer churn in clustered environment

3 participants