Skip to content

[Feature] Add order column in SHOW TABLET stmt result #6658

@morningman

Description

@morningman

Search before asking

  • I had searched in the issues and found no similar issues.

Description

Sometimes, I want to know the order of tablet (AKA bucket sequence of tablet) of a colocation table. So that I can find the Backends list assigned to this bucket.

Use case

mysql> show tablet 126684560\G
*************************** 1. row ***************************
       DbName: default_cluster:db1
    TableName: tbl1
PartitionName: partition1
    IndexName: tbl1
         DbId: 1501243
      TableId: 59019459
  PartitionId: 59019458
      IndexId: 126684539
       IsSync: true
        Order: 5
    DetailCmd: SHOW PROC '/dbs/1501243/59019459/partitions/59019458/126684539/126684560';

And now I know the order of this tablet is 5. Than I can find backend lists of this bucket by:

mysql> show proc "/colocation_group/61190005.97437015";                                                                                                                                                     +-------------+------------------------------+
| BucketIndex | {"location" : "default"}     |
+-------------+------------------------------+
| 0           | 65109230, 63737443, 65108975 |
| 1           | 63737443, 65108975, 65102017 |
| 2           | 63737443, 65108975, 65102017 |
| 3           | 63737443, 65108975, 65109230 |
| 4           | 65102017, 63737443, 65109230 |
| 5           | 65102017, 63737443, 65108975 |
| 6           | 63737443, 65109230, 65108975 |

The backend list of bucket 5 is 65102017, 63737443, 65108975

Related issues

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions