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

feat: introduce node label #19153

Merged
merged 12 commits into from
Nov 25, 2024
Merged

feat: introduce node label #19153

merged 12 commits into from
Nov 25, 2024

Conversation

shanicky
Copy link
Contributor

@shanicky shanicky commented Oct 28, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

This PR attempts to add support for node label

Currently, our label is designed as a single string to serve as an option, but the compute node has a default label that is "default"

Regarding Property, since there is currently no good way to define its meaning, this PR first attempts to unify the Property in WorkerNode with the Property in AddWorkerNode.

Checklist

  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See [details]
  • All checks passed in ./risedev check (or alias, ./risedev c)

@shanicky shanicky marked this pull request as ready for review October 28, 2024 08:32
@graphite-app graphite-app bot requested a review from a team October 28, 2024 09:07
@shanicky shanicky force-pushed the peng/node-label branch 3 times, most recently from 5a7017a to d90fae6 Compare November 4, 2024 07:49
@shanicky shanicky added the ci/run-backwards-compat-tests Run backwards compatibility tests in your PR. label Nov 19, 2024
@shanicky shanicky changed the title [wip]feat: introduce node label feat: introduce node label Nov 19, 2024
@shanicky shanicky requested a review from yezizp2012 November 19, 2024 15:56
Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -482,6 +482,7 @@ mod test {
total_memory_bytes: 34359738368,
reserved_memory_bytes: None,
parallelism: 10,
node_label: "default",

This comment was marked as resolved.

@shanicky shanicky added this pull request to the merge queue Nov 25, 2024
Merged via the queue into main with commit 9bc0b1f Nov 25, 2024
34 of 35 checks passed
@shanicky shanicky deleted the peng/node-label branch November 25, 2024 10:14
Comment on lines 223 to +228
pub fn parallelism(&self) -> usize {
self.parallelism as usize
assert_eq!(self.r#type(), WorkerType::ComputeNode);
self.property
.as_ref()
.expect("property should be exist")
.parallelism as usize
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will panic in some places:

  • diagnose in dashboard
  • show cluster

Can you examine the usages of worker.parallelism()? (Or you may change list_all_nodes() calls to list_cn())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants