Skip to content

Conversation

JmPotato
Copy link
Member

What problem does this PR solve?

Issue Number: close #8323.

What is changed and how does it work?

Bypass the case that `RegionSplitSizeMB` might be zero in `(*StoreConfig) CheckRegionSize`.

Check List

Tests

  • Unit test
  • Integration 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 25, 2024
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 25, 2024
@@ -39,24 +39,32 @@ func TestSizeJSON(t *testing.T) {
}

func TestParseMbFromText(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

If don't use this fix, the new test can still work?

Copy link
Member Author

Choose a reason for hiding this comment

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

The fix doesn't involve any change to ParseMBFromText.

Copy link
Member

Choose a reason for hiding this comment

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

got, Do we need to test this fix?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need to because the panic is caused by integer divide by zero. The added check is sufficient to fix it.

Copy link
Member Author

Choose a reason for hiding this comment

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

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

ti-chi-bot bot commented Jun 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-25 09:14:21.310113839 +0000 UTC m=+710987.795602666: ☑️ agreed by nolouch.
  • 2024-06-25 09:35:54.700305952 +0000 UTC m=+712281.185794785: ☑️ agreed by HuSharp.

@JmPotato JmPotato force-pushed the fix_mb_text_parse branch from 44aa47c to f49aa2a Compare June 25, 2024 09:38
@ti-chi-bot ti-chi-bot bot added the approved label Jun 25, 2024
@JmPotato
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 25, 2024
Signed-off-by: JmPotato <ghzpotato@gmail.com>
@JmPotato JmPotato force-pushed the fix_mb_text_parse branch from f49aa2a to e21a68a Compare June 25, 2024 09:43
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 25, 2024
@JmPotato
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 25, 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.

Copy link
Contributor

ti-chi-bot bot commented Jun 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, niubell, nolouch, okJiang

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 merged commit 6fbe737 into tikv:master Jun 25, 2024
@JmPotato JmPotato deleted the fix_mb_text_parse branch June 25, 2024 09:56
@JmPotato JmPotato added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. labels Jun 25, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #8325.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jun 25, 2024
close tikv#8323

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #8326.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jun 25, 2024
close tikv#8323

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jun 25, 2024
close tikv#8323

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #8327.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #8328.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jun 25, 2024
close tikv#8323

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@JmPotato JmPotato added the needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. label Jun 25, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.1: #8329.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jun 25, 2024
close tikv#8323

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this pull request Jun 26, 2024
close #8323

Bypass the case that `RegionSplitSizeMB` might be zero in `(*StoreConfig) CheckRegionSize`.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jun 26, 2024
close #8323

Bypass the case that `RegionSplitSizeMB` might be zero in `(*StoreConfig) CheckRegionSize`.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jun 26, 2024
close #8323

Bypass the case that `RegionSplitSizeMB` might be zero in `(*StoreConfig) CheckRegionSize`.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jun 26, 2024
close #8323

Bypass the case that `RegionSplitSizeMB` might be zero in `(*StoreConfig) CheckRegionSize`.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jun 26, 2024
close #8323

Bypass the case that `RegionSplitSizeMB` might be zero in `(*StoreConfig) CheckRegionSize`.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: JmPotato <ghzpotato@gmail.com>

Co-authored-by: JmPotato <ghzpotato@gmail.com>
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 needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Size configuration on the TIKV side may cause PD panic
6 participants