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(license): invalidate license when cpu exceeds limit instead of rejecting new compute nodes from joining #20276

Merged
merged 10 commits into from
Jan 27, 2025

Conversation

BugenZhao
Copy link
Member

@BugenZhao BugenZhao commented Jan 23, 2025

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

What's changed and what's your intention?

In #18022, we introduced CPU core limit for license keys, where we would reject new compute nodes from joining the cluster if the limit was exceeded. This led to some confusing behavior like #18401.

In this PR, we modify the behavior so that the license key is temporarily invalidated (thus all Paid features unavailable) when the CPU exceeds its limit. This requires the information of "cluster size" is broadcast to all worker nodes. For simplicity, a new notification variant of compute_node_total_cpu_count is introduced, instead of maintaining the complete worker node meta data.

The benefit is that, the check for CPU limit is deferred until a paid feature is actually used, and scaling out the cluster won't trigger a hard error any more. If the user isn't utilizing any paid features, they may not even notice this limit. This may enable us to offer a default 'Paid' license key with a small CPU limit in production, helping users better investigate and demonstrate our product.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • My PR contains critical fixes that are necessary to be merged into the latest release.

Documentation

  • My PR needs documentation updates.
Release note

Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

gru-agent bot commented Jan 24, 2025

This pull request has been modified. If you want me to regenerate unit test for any of the files related, please find the file in "Files Changed" tab and add a comment @gru-agent. (The github "Comment on this file" feature is in the upper right corner of each file in "Files Changed" tab.)

…ejecting new compute nodes from joining

Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
Signed-off-by: Bugen Zhao <[email protected]>
@BugenZhao BugenZhao force-pushed the bz/invalidate-license-when-cpu-exceeds-limit branch from 68b6ce5 to 3fcb446 Compare January 24, 2025 08:12
@BugenZhao BugenZhao added this pull request to the merge queue Jan 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 25, 2025
@BugenZhao BugenZhao added this pull request to the merge queue Jan 27, 2025
Merged via the queue into main with commit 0f5bae0 Jan 27, 2025
34 checks passed
@BugenZhao BugenZhao deleted the bz/invalidate-license-when-cpu-exceeds-limit branch January 27, 2025 10:40
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