Skip to content

Fix potential deadlock in MultiLastSeqs#6899

Merged
neilalexander merged 2 commits intomainfrom
neil/msinversion
May 16, 2025
Merged

Fix potential deadlock in MultiLastSeqs#6899
neilalexander merged 2 commits intomainfrom
neil/msinversion

Conversation

@neilalexander
Copy link
Copy Markdown
Member

MultiLastSeqs already held the read lock before calling AllLastSeqs which would try to take the read lock again, but this could result in a deadlock if another goroutine is meanwhile trying to take the lock for writing.

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

Signed-off-by: Neil Twigg <neil@nats.io>
Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander marked this pull request as ready for review May 16, 2025 13:05
@neilalexander neilalexander requested a review from a team as a code owner May 16, 2025 13:05
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 e77abce into main May 16, 2025
48 checks passed
@neilalexander neilalexander deleted the neil/msinversion branch May 16, 2025 13:45
neilalexander added a commit that referenced this pull request May 20, 2025
Includes the following:

- #6895
- #6899
- #6900
- #6908

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