Skip to content

Fix logical race on shutting down clustered JetStream#7536

Merged
neilalexander merged 1 commit intomainfrom
neil/clusterquitc
Nov 10, 2025
Merged

Fix logical race on shutting down clustered JetStream#7536
neilalexander merged 1 commit intomainfrom
neil/clusterquitc

Conversation

@neilalexander
Copy link
Copy Markdown
Member

Multiple goroutines listen to js.clusterQuitC(), so when shutdownJetStream() sent a message into the qch, it could have been picked up by other goroutines instead of monitorCluster(). Instead, close the channel and wait for completion on a second channel.

Signed-off-by: Neil Twigg neil@nats.io

Multiple goroutines listen to `js.clusterQuitC()`, so when `shutdownJetStream()`
sent a message into the `qch`, it could have been picked up by other goroutines
instead of `monitorCluster()`. Instead, close the channel and wait for completion
on a second channel.

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander requested a review from a team as a code owner November 10, 2025 14:39
Copy link
Copy Markdown
Member

@MauriceVanVeen MauriceVanVeen 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 e35891b into main Nov 10, 2025
90 of 92 checks passed
@neilalexander neilalexander deleted the neil/clusterquitc branch November 10, 2025 15:03
neilalexander added a commit that referenced this pull request Nov 12, 2025
Includes the following:

- #7535
- #7536
- #7538
- #7539
- #7440
- #7543

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

- #7534
- #7535
- #7536
- #7537
- #7538
- #7539
- #7543
- #7456

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.

2 participants