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: disable EnablePrefixMatching and avoid misuse of store remove and store delete #8414

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jul 17, 2024

What problem does this PR solve?

Issue Number: Close #8413

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

pd-ctl: disable EnablePrefixMatching and avoid misuse of `store remove` and `store delete`

@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/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 17, 2024
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.26%. Comparing base (1a20c85) to head (7d69257).
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8414      +/-   ##
==========================================
+ Coverage   77.21%   77.26%   +0.05%     
==========================================
  Files         471      471              
  Lines       61835    61910      +75     
==========================================
+ Hits        47747    47836      +89     
+ Misses      10499    10486      -13     
+ Partials     3589     3588       -1     
Flag Coverage Δ
unittests 77.26% <40.00%> (+0.05%) ⬆️

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

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 18, 2024
@@ -706,7 +706,11 @@ func showAllStoresLimitCommandFunc(cmd *cobra.Command, args []string) {
cmd.Println(r)
}

func removeTombStoneCommandFunc(cmd *cobra.Command, _ []string) {
func removeTombStoneCommandFunc(cmd *cobra.Command, args []string) {
Copy link
Member

Choose a reason for hiding this comment

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

maybe EnablePrefixMatching is a dangerous operator for the user, do we need to disable it?

Copy link
Member

Choose a reason for hiding this comment

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

ref

cobra.EnablePrefixMatching = true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea

@lhy1024 lhy1024 changed the title pd-ctl: avoid misuse of store remove and store delete pd-ctl: disable EnablePrefixMatching and avoid misuse of store remove and store delete Jul 22, 2024
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jul 22, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, rleungx

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

The pull request process is described 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

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 22, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 22, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-18 06:23:57.272208051 +0000 UTC m=+507859.263149515: ☑️ agreed by rleungx.
  • 2024-07-22 06:12:56.502948096 +0000 UTC m=+852798.493889567: ☑️ agreed by HuSharp.

Copy link
Contributor

ti-chi-bot bot commented Jul 22, 2024

@lhy1024: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot bot merged commit 7b014aa into tikv:master Jul 22, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pd-ctl: avoid misuse of store remove and store delete
3 participants