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

tools/simulator: support deleting a specified store #8246

Merged
merged 5 commits into from
Jun 21, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jun 4, 2024

What problem does this PR solve?

Issue Number: Ref #8135

What is changed and how does it work?

support deleting a specified store

can execute curl --location --request POST 'http://127.0.0.1:20180/event?event=down-node&node-id=6'

for example, in balance-leader case

image image

Check List

Tests

  • Integration test
  • Manual test (add detailed scripts or steps below)

Release note

None.

Copy link
Contributor

ti-chi-bot bot commented Jun 4, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 4, 2024
@HuSharp HuSharp requested review from lhy1024 and rleungx June 4, 2024 07:24
@ti-chi-bot ti-chi-bot bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 4, 2024
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.44%. Comparing base (3b051d7) to head (8cd1cdd).

Current head 8cd1cdd differs from pull request most recent head 5c83eae

Please upload reports for the commit 5c83eae to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8246      +/-   ##
==========================================
+ Coverage   77.29%   77.44%   +0.15%     
==========================================
  Files         470      471       +1     
  Lines       61495    61405      -90     
==========================================
+ Hits        47533    47557      +24     
+ Misses      10401    10297     -104     
+ Partials     3561     3551      -10     
Flag Coverage Δ
unittests 77.44% <ø> (+0.15%) ⬆️

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

@ti-chi-bot ti-chi-bot bot added the dco-signoff: yes Indicates the PR's author has signed the dco. label Jun 5, 2024
Signed-off-by: husharp <jinhao.hu@pingcap.com>
@HuSharp HuSharp changed the title tools/simulator: make add/down node work tools/simulator: support deleting a specified store Jun 5, 2024
for i := 1; i <= totalStore; i++ {
leaderCount := regions.GetStoreLeaderCount(uint64(i))
if !isUniform(leaderCount, totalRegion/totalStore) {
simCase.Checker = func(stores []*metapb.Store, regions *core.RegionsInfo, _ []info.StoreStats) bool {
Copy link
Member

@rleungx rleungx Jun 5, 2024

Choose a reason for hiding this comment

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

Do we still need this checker?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I think we can keep the logic for previous cases

Copy link
Member

@rleungx rleungx left a comment

Choose a reason for hiding this comment

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

LGTM except for the lint issue.

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 5, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 11, 2024

@okJiang: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

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 kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 21, 2024
@nolouch
Copy link
Contributor

nolouch commented Jun 21, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented Jun 21, 2024

@nolouch: We have migrated to builtin LGTM and approve plugins for reviewing.

👉 Please use /approve when you want approve this pull request.

The changes announcement: Proposal: Strengthen configuration change approval.

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 added the lgtm label Jun 21, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: niubell, nolouch, okJiang, 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 approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 21, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-21 06:08:09.644931475 +0000 UTC m=+354216.130420300: ☑️ agreed by nolouch.
  • 2024-06-21 06:22:13.248877393 +0000 UTC m=+355059.734366225: ☑️ agreed by niubell.

@ti-chi-bot ti-chi-bot bot merged commit 41e6376 into tikv:master Jun 21, 2024
17 checks passed
@HuSharp HuSharp deleted the simulator_add_node branch June 21, 2024 06:31
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-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants