Skip to content

Correct and simplify stream assignment check#7290

Merged
neilalexander merged 1 commit intomainfrom
improve-isStreamAssigned
Sep 10, 2025
Merged

Correct and simplify stream assignment check#7290
neilalexander merged 1 commit intomainfrom
improve-isStreamAssigned

Conversation

@sciascid
Copy link
Copy Markdown
Contributor

Remove misleading comment for the loop at the end of isStreamAssigned: "Check if we are the leader of this raftGroup [...]". This code is checking for membership, not leadership of the group.
Instead of fixing the comment, replace the whole loop with a call to isMember.
Same for isConsumerAssigned.

Signed-off-by: Daniele Sciascia daniele@nats.io

Remove misleading comment for the loop at the end of
isStreamAssigned: "Check if we are the leader of this
raftGroup [...]". This code is checking for membership,
not leadership of the group.
Instead of fixing the comment, replace the whole loop
with a call to isMember.
Same for isConsumerAssigned.

Signed-off-by: Daniele Sciascia <daniele@nats.io>
@sciascid sciascid requested a review from a team as a code owner September 10, 2025 06:06
Copy link
Copy Markdown
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 5184082 into main Sep 10, 2025
69 of 70 checks passed
@neilalexander neilalexander deleted the improve-isStreamAssigned branch September 10, 2025 08:42
neilalexander added a commit that referenced this pull request Sep 29, 2025
Includes the following:

- #7290
- #7295
- #7291
- #7287
- #7299
- #7300
- #7297
- #7303
- #7304
- #7305
- #7309
- #7307
- #7320
- #7337
- #7344
- #7345
- #7348
- #7349
- #7350
- #7357
- #7356
- #7358
- #7367
- #7293

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