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

pd-ctl: print warn information when set max-replica to less than 3 #8983

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jan 8, 2025

What problem does this PR solve?

Issue Number: Close #8959

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 8, 2025
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.33%. Comparing base (75cdec4) to head (8f0c1ce).
Report is 1099 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8983      +/-   ##
==========================================
+ Coverage   74.91%   76.33%   +1.42%     
==========================================
  Files         416      465      +49     
  Lines       42103    70555   +28452     
==========================================
+ Hits        31543    53861   +22318     
- Misses       7810    13350    +5540     
- Partials     2750     3344     +594     
Flag Coverage Δ
unittests 76.33% <100.00%> (+1.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

if key == "max-replicas" {
replica, err := strconv.ParseInt(value, 10, 64)
if err == nil && replica < sc.DefaultMaxReplicas {
cmd.Println("Setting max-replica to less than 3 may be a mistake and carries high risk. Please confirm the setting.")
Copy link
Member

@rleungx rleungx Jan 9, 2025

Choose a reason for hiding this comment

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

I think the original issue wants an interactive way to confirm the operation instead of just printing a message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After the discussion with @niubell , we will not add an interactive way in pd-ctl for now.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 9, 2025
Copy link
Contributor

ti-chi-bot bot commented Jan 9, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: okJiang
Once this PR has been reviewed and has the lgtm label, please ask for approval from lhy1024, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

ti-chi-bot bot commented Jan 9, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-09 02:57:37.363016347 +0000 UTC m=+408800.651848082: ☑️ agreed by okJiang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the dco. needs-1-more-lgtm Indicates a PR needs 1 more LGTM. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

double confirm or print warn information when set max-replica to less than 3
3 participants