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

infosync: correct the PD API call of GetLabelRules #55189

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Aug 5, 2024

What problem does this PR solve?

Issue Number: close #55188.

What changed and how does it work?

Correct the PD API call of GetLabelRules to GetRegionLabelRulesByIDs.

Check List

Tests

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

SQL:

mysql> CREATE TABLE t (
    ->   a INT
    -> )
    -> PARTITION BY RANGE (a) (
    ->   PARTITION p0 VALUES LESS THAN (10)
    -> );
Query OK, 0 rows affected (0.04 sec)

mysql> ALTER TABLE t ATTRIBUTES 'merge_option=deny';
Query OK, 0 rows affected (0.03 sec)

mysql> ALTER TABLE t PARTITION p0 ATTRIBUTES 'merge_option=allow';
Query OK, 0 rows affected (0.03 sec)

mysql> ALTER TABLE t REMOVE PARTITIONING;
Query OK, 0 rows affected (0.20 sec)

mysql> SELECT * FROM information_schema.attributes WHERE attributes LIKE '%merge_option%';
Empty set (0.00 sec)

Before:

image

After:

image

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed 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. and removed do-not-merge/needs-triage-completed labels Aug 5, 2024
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.2668%. Comparing base (f3e153a) to head (67e8475).
Report is 2 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55189        +/-   ##
================================================
+ Coverage   74.8430%   75.2668%   +0.4238%     
================================================
  Files          1568       1568                
  Lines        364503     439940     +75437     
================================================
+ Hits         272805     331129     +58324     
- Misses        71976      88237     +16261     
- Partials      19722      20574       +852     
Flag Coverage Δ
integration 50.1442% <100.0000%> (?)

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

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 61.8698% <ø> (+14.1691%) ⬆️

Signed-off-by: JmPotato <ghzpotato@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 5, 2024
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Aug 5, 2024
Copy link

ti-chi-bot bot commented Aug 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 5, 2024
Copy link

ti-chi-bot bot commented Aug 5, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-05 10:07:13.478923473 +0000 UTC m=+260163.346022547: ☑️ agreed by rleungx.
  • 2024-08-05 10:20:45.449517648 +0000 UTC m=+260975.316616736: ☑️ agreed by tangenta.

@ti-chi-bot ti-chi-bot bot merged commit 6e03d23 into pingcap:master Aug 5, 2024
24 checks passed
@JmPotato JmPotato deleted the fix_GetLabelRules branch August 5, 2024 10:32
@JmPotato
Copy link
Member Author

JmPotato commented Aug 5, 2024

/cherry-pick release-8.1

@ti-chi-bot
Copy link
Member

@JmPotato: new pull request created to branch release-8.1: #55197.

In response to this:

/cherry-pick release-8.1

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 pushed a commit to ti-chi-bot/tidb that referenced this pull request Aug 5, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. 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.

GetLabelRules incorrectly returned all the region label rules
4 participants