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

support show table partition regions #855

Merged
merged 2 commits into from
May 15, 2020

Conversation

crazycs520
Copy link
Contributor

@crazycs520 crazycs520 commented May 15, 2020

Signed-off-by: crazycs520 crazycs520@gmail.com

What problem does this PR solve?

As the title said.

here is an example:

mysql>show table t partition (p4) regions;
+-----------+----------------+----------------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+
| REGION_ID | START_KEY      | END_KEY        | LEADER_ID | LEADER_STORE_ID | PEERS | SCATTERING | WRITTEN_BYTES | READ_BYTES | APPROXIMATE_SIZE(MB) | APPROXIMATE_KEYS |
+-----------+----------------+----------------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+
| 1047      | t_154_r        | t_154_r_200000 | 1048      | 1               | 1048  | 0          | 0             | 0          | 1                    | 1                |
| 1049      | t_154_r_200000 | t_154_r_400000 | 1050      | 1               | 1050  | 0          | 0             | 0          | 1                    | 0                |
| 1051      | t_154_r_400000 | t_154_r_600000 | 1052      | 1               | 1052  | 0          | 0             | 0          | 1                    | 0                |
| 1053      | t_154_r_600000 | t_154_r_800000 | 1054      | 1               | 1054  | 0          | 0             | 0          | 1                    | 0                |
| 2         | t_154_r_800000 |                | 3         | 1               | 3     | 0          | 747           | 0          | 1                    | 0                |
| 1045      | t_154_         | t_154_r        | 1046      | 1               | 1046  | 0          | 0             | 0          | 1                    | 1                |
+-----------+----------------+----------------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+
6 rows in set
Time: 0.009s
mysql>show table t partition (p3) regions;
+-----------+-----------+---------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+
| REGION_ID | START_KEY | END_KEY | LEADER_ID | LEADER_STORE_ID | PEERS | SCATTERING | WRITTEN_BYTES | READ_BYTES | APPROXIMATE_SIZE(MB) | APPROXIMATE_KEYS |
+-----------+-----------+---------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+
| 1041      | t_153_    | t_154_  | 1042      | 1               | 1042  | 0          | 0             | 0          | 1                    | 0                |
+-----------+-----------+---------+-----------+-----------------+-------+------------+---------------+------------+----------------------+------------------+
1 row in set

What is changed and how it works?

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • No

Related changes

  • Need to cherry-pick to the release branch

Signed-off-by: crazycs520 <crazycs520@gmail.com>
@crazycs520 crazycs520 requested a review from a team May 15, 2020 03:19
@ghost ghost requested review from tangenta and removed request for a team May 15, 2020 03:19
@codecov
Copy link

codecov bot commented May 15, 2020

Codecov Report

Merging #855 into master will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #855   +/-   ##
=======================================
  Coverage   78.28%   78.28%           
=======================================
  Files          40       40           
  Lines       14665    14667    +2     
=======================================
+ Hits        11480    11482    +2     
  Misses       2502     2502           
  Partials      683      683           

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

LGTM

@kennytm kennytm added the status/LGT1 LGT1 label May 15, 2020
@crazycs520
Copy link
Contributor Author

/rebuild

Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

@tangenta tangenta added status/LGT2 LGT2 and removed status/LGT1 LGT1 labels May 15, 2020
@crazycs520
Copy link
Contributor Author

/run-all-tests

@kennytm kennytm merged commit baa4736 into pingcap:master May 15, 2020
@crazycs520 crazycs520 deleted the show-partition-region branch May 15, 2020 08:32
crazycs520 added a commit to crazycs520/parser that referenced this pull request May 20, 2020
Signed-off-by: crazycs520 <crazycs520@gmail.com>
crazycs520 added a commit that referenced this pull request May 21, 2020
Signed-off-by: crazycs520 <crazycs520@gmail.com>
AilinKid pushed a commit to AilinKid/parser that referenced this pull request Jun 2, 2020
Signed-off-by: crazycs520 <crazycs520@gmail.com>
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
Signed-off-by: crazycs520 <crazycs520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants