Scenarios
You can use the obdiag rca run command to analyze the ddl_disk_full scenario. You can specify the write magnification of OceanBase Database and the source table size in the command to check whether the nodes have sufficient storage space.
OceanBase Database V4.0.0.0 and later are supported for this feature. When you use obdiag commands, you must configure cluster information in the ~/.obdiag/config.yml file or by specifying --config options in the commands.
Notice
Internal data is updated in real time. Therefore, obdiag only supports the analysis of current data.
The write magnification in OceanBase Database V4.2.3.0 and later is 1.5, and that in earlier versions is 5.5.
Supported environment variables
| Variable | Required | Data type | Default value | Description |
|---|---|---|---|---|
| table_name | Yes | string | "" | The name of the table. |
| tenant_name | Yes | string | 10 | The name of the tenant. |
| action_type | No | string | add_index | The action type. The valid value is add_index. |
| index_name | Yes | string | "" | The name of the index. |
Examples
Specify the scenario and the environment variables in the command.
obdiag rca run --scene=ddl_disk_full --env tenant_name=test1 --env table_name=t555 -env action_type=add_index -env index_name=k1
Results
In the following command output, -4.32 TB and -4.31 TB indicate insufficient storage space on the corresponding nodes. You can increase the storage space of the nodes.
+----------------------------------------------------------------------------------------------------------+
| record |
+------+---------------------------------------------------------------------------------------------------+
| step | info |
+------+---------------------------------------------------------------------------------------------------+
| 1 | table_id is 510175 |
| 2 | tenant_id is 1002 |
| 3 | on xxx.xxx.xxx.xxx:xxxx tablet_size: 4545356170733 as 4.13 TB |
| 4 | on xxx.xxx.xxx.xxx:xxxx tablet_size: 4541074892527 as 4.13 TB |
| 5 | estimated_size is [{'svr_ip': 'xxx.xxx.xxx.xxx', 'svr_port': xxxx, 'estimated_data_size': |
| | Decimal('4545356170733')}, {'svr_ip': 'xxx.xxx.xxx.xxx', 'svr_port': xxxx, 'estimated_data_size': |
| | Decimal('4541074892527')}] |
| 6 | index_name is idx_user_tx |
| 7 | action_type is add_index |
| 8 | index_table_id is 512088 |
| 9 | main_table_sum_of_data_length is 336 |
| 10 | index_table_sum_of_data_length is 80 |
| 11 | estimated_index_size without magnification 1082227659698B as 1007.90 GB from: |
| | index_table_sum_of_data_length(80)/main_table_sum_of_data_length(336) * |
| | estimated_data_size(4545356170733) |
| 12 | magnification is 5.5 |
| 13 | estimated_index_size with magnification is 5952252128339B as 5.41 TB |
| 14 | On target_server_ip is xxx.xxx.xxx.xxx, target_server_port is xxxx, estimiated_index_size is |
| | 5952252128339B as 5.41 TB |
| 15 | estimated_index_size without magnification 1081208307744B as 1006.95 GB from: |
| | index_table_sum_of_data_length(80)/main_table_sum_of_data_length(336) * |
| | estimated_data_size(4541074892527) |
| 16 | magnification is 5.5 |
| 17 | estimated_index_size with magnification is 5946645692592B as 5.41 TB |
| 18 | On target_server_ip is xxx.xxx.xxx.xxx, target_server_port is xxxx, estimiated_index_size is |
| | 5946645692592B as 5.41 TB |
| 19 | On target_serveris xxx.xxx.xxx.xxx:xxxx |
| 20 | target_server_estimated_size is 5952252128339B as 5.41 TB |
| 21 | target_server_total_size is 3221225472000B as 2.93 TB |
| 22 | target_server_used_size is 1696442875904B as 1.54 TB |
| 23 | data_disk_usage_limit_percentage is 90 |
| 24 | available_disk_space is 1202660048896B as 1.09 TB |
| 25 | available_disk_space - target_server_estimated_size is -4749592079443B as -4.32 TB |
| 26 | On target_serveris xxx.xxx.xxx.xxx:xxxx |
| 27 | target_server_estimated_size is 5946645692592B as 5.41 TB |
| 28 | target_server_total_size is 3221225472000B as 2.93 TB |
| 29 | target_server_used_size is 1695073435648B as 1.54 TB |
| 30 | data_disk_usage_limit_percentage is 90 |
| 31 | available_disk_space is 1204029489152B as 1.10 TB |
| 32 | available_disk_space - target_server_estimated_size is -4742616203440B as -4.31 TB |
+------+---------------------------------------------------------------------------------------------------+
References
OceanBase Database Diagnostics and Turning (11) - ddl_disk_full Error