Skip to content

Reduce contention on ConsumerStore creation#7700

Merged
neilalexander merged 1 commit intomainfrom
neil/fsclosed
Jan 6, 2026
Merged

Reduce contention on ConsumerStore creation#7700
neilalexander merged 1 commit intomainfrom
neil/fsclosed

Conversation

@neilalexander
Copy link
Copy Markdown
Member

Previously creating a ConsumerStore required taking the stream lock to determine whether the parent stream store was closed or not. Switch to an atomic so that this no longer requires the lock.

This should speed up creating consumers in a system where the streams are heavily loaded or contended.

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

Previously creating a `ConsumerStore` required taking the stream lock to
determine whether the parent stream store was closed or not. Switch to
an atomic so that this no longer requires the lock.

This should speed up creating consumers in a system where the streams are
heavily loaded or contended.

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander marked this pull request as ready for review January 6, 2026 10:16
@neilalexander neilalexander requested a review from a team as a code owner January 6, 2026 10:16
Copy link
Copy Markdown
Contributor

@sciascid sciascid 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 1723f25 into main Jan 6, 2026
111 of 115 checks passed
@neilalexander neilalexander deleted the neil/fsclosed branch January 6, 2026 10:29
neilalexander added a commit that referenced this pull request Jan 6, 2026
Includes the following:

- #7565
- #7589
- #7600
- #7602
- #7609
- #7610
- #7632
- #7649
- #7642
- #7658
- #7659
- #7661
- #7662
- #7663
- #7668
- #7683
- #7685
- #7686
- #7678
- #7691
- #7696
- #7698
- #7699
- #7700

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

- #7658
- #7659
- #7661
- #7662
- #7663
- #7642
- #7668
- #7683
- #7685
- #7686
- #7678
- #7691
- #7696
- #7697
- #7698
- #7699
- #7700

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