Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for placement tags and preferred to metaleader stepdown request #6282

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

neilalexander
Copy link
Member

@neilalexander neilalexander commented Dec 19, 2024

This makes it possible to nominate a JetStream metaleader transfer to servers matching specific placement tags in addition to cluster names, or optionally, to a specific named server.

  • If preferred_server is specified then placement will select that server only.
  • Otherwise, either cluster or tags can be supplied for placement. If both the cluster and tags are supplied then the placement will select a server that matches both.
  • If multiple tags are specified, the placement will select servers only if they match all supplied tags.

Also factors out some of the logic for making the preferred leader decision so that it could be reused for stream & consumer stepdowns.

Signed-off-by: Neil Twigg [email protected]

@neilalexander neilalexander force-pushed the neil/jsstepdownpreferred branch from 3887950 to f607366 Compare December 19, 2024 11:07
@neilalexander neilalexander marked this pull request as draft December 19, 2024 11:20
@neilalexander neilalexander changed the title Add preferred_server to metaleader stepdown request Add support for placement tags and preferred_server to metaleader stepdown request Dec 19, 2024
@neilalexander neilalexander force-pushed the neil/jsstepdownpreferred branch from 3ce0de6 to 63bc8d5 Compare December 19, 2024 12:06
@neilalexander neilalexander marked this pull request as ready for review December 19, 2024 12:48
@neilalexander neilalexander requested a review from a team as a code owner December 19, 2024 12:48
@neilalexander neilalexander force-pushed the neil/jsstepdownpreferred branch from 63bc8d5 to d67ca4f Compare December 19, 2024 14:06
server/jetstream_api.go Outdated Show resolved Hide resolved
server/jetstream_api.go Outdated Show resolved Hide resolved
server/jetstream_api.go Show resolved Hide resolved
server/jetstream_cluster.go Outdated Show resolved Hide resolved
@neilalexander neilalexander force-pushed the neil/jsstepdownpreferred branch from 8d60838 to 8bec6b1 Compare December 19, 2024 16:45
This makes it possible to nominate a JetStream metaleader transfer to a specific server
or servers that match a specific set of tags. Also factors out some of the logic for making
the preferred leader decision so that it could be reused for stream & consumer stepdowns.

Signed-off-by: Neil Twigg <[email protected]>
@neilalexander neilalexander force-pushed the neil/jsstepdownpreferred branch from 8bec6b1 to da0cbf7 Compare December 19, 2024 16:45
@neilalexander neilalexander changed the title Add support for placement tags and preferred_server to metaleader stepdown request Add support for placement tags and preferred to metaleader stepdown request Dec 19, 2024
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

@derekcollison derekcollison merged commit 10c2971 into main Dec 19, 2024
5 checks passed
@derekcollison derekcollison deleted the neil/jsstepdownpreferred branch December 19, 2024 17:22
derekcollison added a commit that referenced this pull request Dec 19, 2024
… stepdown requests (#6284)

Like #6282, this adds preferred placement support to stream and consumer
stepdowns too.

Signed-off-by: Neil Twigg <[email protected]>
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