Skip to main content

SHOW TABLET DIAGNOSIS

Description​

This statement is used to diagnose the specified tablet. The result will display information about the tablet along with any potential issues.

Syntax​

SHOW TABLET DIAGNOSIS <tablet_id>

Required Parameters​

1. <tablet_id>

The ID of the tablet to be diagnosed.

Return Value​

ColumnDataTypeNote
TabletExistStringIndicates whether the tablet exists.
TabletIdStringThe ID of the tablet.
DatabaseStringThe database the tablet belongs to, along with its ID.
TableStringThe table the tablet belongs to, along with its ID.
PartitionStringThe partition the tablet belongs to, along with its ID.
MaterializedIndexStringThe materialized index the tablet belongs to, along with its ID.
Replicas(ReplicaId -> BackendId)StringThe replicas of the tablet and their respective BE nodes.
ReplicasNumStringIndicates whether the number of replicas is correct.
ReplicaBackendStatusStringIndicates whether the BE node where the replica is located is functioning properly.
ReplicaVersionStatusStringIndicates whether the version number of the replica is correct.
ReplicaStatusStringIndicates whether the replica status is normal.
ReplicaCompactionStatusStringIndicates whether the compaction status of the replica is normal.

Access Control Requirements​

The user executing this SQL command must have at least the following privileges:

PrivilegeObjectNotes
Admin_privDatabaseRequired to execute administrative operations on the database, including managing tables, partitions, and system-level commands.

Examples​

SHOW TABLET DIAGNOSIS 10145;
+----------------------------------+------------------+------------+
| Item | Info | Suggestion |
+----------------------------------+------------------+------------+
| TabletExist | Yes | |
| TabletId | 10145 | |
| Database | test: 10103 | |
| Table | sell_user: 10143 | |
| Partition | sell_user: 10142 | |
| MaterializedIndex | sell_user: 10144 | |
| Replicas(ReplicaId -> BackendId) | {"10146":10009} | |
| ReplicasNum | OK | |
| ReplicaBackendStatus | OK | |
| ReplicaVersionStatus | OK | |
| ReplicaStatus | OK | |
| ReplicaCompactionStatus | OK | |
+----------------------------------+------------------+------------+