Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MySQL [(none)]>
MySQL [(none)]>
MySQL [(none)]> CREATE RESOURCE UNIT unit_1
→ MAX_CPU 2,
→ MEMORY_SIZE ‘2G’,
→ MAX_IOPS 5000,
→ MIN_IOPS 2000,
→ LOG_DISK_SIZE ‘5G’ ;
Query OK, 0 rows affected (0.07 sec)
MySQL [(none)]> CREATE RESOURCE POOL pool_1
→ UNIT ‘unit_1’,
→ UNIT_NUM 1,
→ ZONE_LIST (‘zone1’,‘zone2’,‘zone3’);
Query OK, 0 rows affected (0.15 sec)
MySQL [(none)]> create tenant tnt_test resource_pool_list=(‘pool_1’);
ERROR 4550 (HY000): rootservice is shutdown
MySQL [(none)]> drop tenant tnt_test;
ERROR 1235 (0A000): should drop tenant force, delay drop tenant not supported
MySQL [(none)]> drop tenant tnt_test force;
Query OK, 0 rows affected (0.28 sec)
MySQL [(none)]>
MySQL [(none)]>
MySQL [(none)]> CREATE RESOURCE UNIT unit_1
→ MAX_CPU 2,
→ MEMORY_SIZE ‘2G’,
→ MAX_IOPS 5000,
→ MIN_IOPS 3000,
→ LOG_DISK_SIZE ‘5G’ ;
ERROR 4649 (HY000): resource unit ‘unit_1’ already exist
MySQL [(none)]> CREATE RESOURCE POOL pool_1
→ UNIT ‘unit_1’,
→ UNIT_NUM 1,
→ ZONE_LIST (‘zone1’,‘zone2’,‘zone3’);
ERROR 4651 (HY000): resource pool ‘pool_1’ exist
MySQL [(none)]> create tenant tnt_test resource_pool_list=(‘pool_1’);
ERROR 4038 (HY000): The observer or zone is not the master
MySQL [(none)]>
MySQL [(none)]> drop tenant tnt_test force;
ERROR 5157 (HY000): Unknown tenant ‘tnt_test’
MySQL [(none)]>
MySQL [(none)]>
MySQL [(none)]>
MySQL [(none)]>
MySQL [(none)]> drop tenant tnt_test force;
ERROR 5157 (HY000): Unknown tenant ‘tnt_test’
这个执行报错 按照下面的语句 执行一下 把日志上传一下
a. 登录系统租户,打开enable_rich_error_msg 参数
alter system set enable_rich_error_msg=true;
b. 登录业务租户,执行报错 SQL 语句,会直接返回执行节点 IP 和 trace_id 信息。
obclient [test]> select count(*) from t2;
ERROR 1146 (42S02): Table ‘test.t2’ doesn’t exist
[xx.xx.xx.1:2882] [2024-04-13 20:10:20.292087] [YB420BA1CC68-000615A0A8EA5E38-0-0]
c. 去 xx.xx.xx.1 节点过滤日志,如果最新日志无法过滤到,可以正则匹配多个日志进行过滤
[root@x.x.x.1 ~]$ grep “YB420BA1CC68-000615A0A8EA5E38-0-0” rootservice.log
[root@x.x.x.1 ~]$ grep “YB420BA1CC68-000615A0A8EA5E38-0-0” observer.log
d. 获取完日志信息后,关闭enable_rich_error_msg参数
alter system set enable_rich_error_msg=false;