Oceanbase指定租户进行合并错误代码 4217

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】4.3.0.1
【问题描述】
执行ALTER SYSTEM MAJOR FREEZE tenant = lhz_mt03;
出现
ERROR 4217 (HY000): Major freeze not allowed now
【复现路径】
【附件及日志】
相关日志
337136-[2025-01-22 10:11:25.889899] INFO [STORAGE.TRANS] print_stat_info (ob_keep_alive_ls_handler.cpp:214) [16671][T1028_TenantWea][T1028][Y0-0000000000000000-0-0] [lt=16] [Keep Alive Stat] LS Keep Alive Info(tenant_id=1028, LS_ID={id:1}, Not_Master_Cnt=1, Near_To_GTS_Cnt=0, Other_Error_Cnt=0, Submit_Succ_Cnt=0, last_scn="{val:1737473575722792200, v:0}", last_lsn={lsn:522537088}, last_gts={val:0, v:0}, min_start_scn="{val:0, v:0}", min_start_status=1, sys_ls_end_scn={val:0, v:0})
337616-[2025-01-22 10:11:25.889933] INFO [STORAGE.TRANS] generate_weak_read_timestamp_ (ob_ls_wrs_handler.cpp:193) [16671][T1028_TenantWea][T1028][Y0-0000000000000000-0-0] [lt=23] get wrs ts(ls_id={id:1001}, delta=38306661512, log_service_ts=1737473579227527, min_tx_service_ts=4611686018427387, timestamp={val:1737473579227527667, v:0})
337948-[2025-01-22 10:11:25.889948] INFO [STORAGE.TRANS] print_stat_info (ob_keep_alive_ls_handler.cpp:214) [16671][T1028_TenantWea][T1028][Y0-0000000000000000-0-0] [lt=12] [Keep Alive Stat] LS Keep Alive Info(tenant_id=1028, LS_ID={id:1001}, Not_Master_Cnt=1, Near_To_GTS_Cnt=0, Other_Error_Cnt=0, Submit_Succ_Cnt=0, last_scn="{val:18446744073709551615, v:3}", last_lsn={lsn:18446744073709551615}, last_gts={val:0, v:0}, min_start_scn="{val:18446744073709551615, v:3}", min_start_status=0, sys_ls_end_scn={val:0, v:0})
338462-[2025-01-22 10:11:25.901805] INFO [STORAGE.TRANS] update_cluster_version (ob_tenant_weak_read_cluster_service.cpp:688) [11946][T1026_TenantWea][T1026][Y0-0000000000000000-0-0] [lt=17] no need to update min/max version(new_version={val:1737473579227483318, v:0}, min_version={val:1737473579227483318, v:0}, max_version={val:1737473579227483318, v:0})
338813-[2025-01-22 10:11:25.901847] INFO [STORAGE.TRANS] generate_weak_read_timestamp_ (ob_ls_wrs_handler.cpp:193) [11946][T1026_TenantWea][T1026][Y0-0000000000000000-0-0] [lt=18] get wrs ts(ls_id={id:1}, delta=38306674174, log_service_ts=1737473579227483, min_tx_service_ts=4611686018427387, timestamp={val:1737473579227483318, v:0})
339142-[2025-01-22 10:11:25.901865] INFO [STORAGE.TRANS] print_stat_info (ob_keep_alive_ls_handler.cpp:214) [11946][T1026_TenantWea][T1026][Y0-0000000000000000-0-0] [lt=14] [Keep Alive Stat] LS Keep Alive Info(tenant_id=1026, LS_ID={id:1}, Not_Master_Cnt=1, Near_To_GTS_Cnt=0, Other_Error_Cnt=0, Submit_Succ_Cnt=0, last_scn="{val:1737473575237244108, v:0}", last_lsn={lsn:482938975}, last_gts={val:0, v:0}, min_start_scn="{val:0, v:0}", min_start_status=1, sys_ls_end_scn={val:0, v:0})
339622-[2025-01-22 10:11:25.902763] INFO [STORAGE.TRANS] generate_weak_read_timestamp_ (ob_ls_wrs_handler.cpp:193) [11946][T1026_TenantWea][T1026][Y0-0000000000000000-0-0] [lt=20] get wrs ts(ls_id={id:1001}, delta=38306675229, log_service_ts=1737473579227483, min_tx_service_ts=4611686018427387, timestamp={val:1737473579227483318, v:0})
339954-[2025-01-22 10:11:25.902778] INFO [STORAGE.TRANS] print_stat_info (ob_keep_alive_ls_handler.cpp:214) [11946][T1026_TenantWea][T1026][Y0-0000000000000000-0-0] [lt=12] [Keep Alive Stat] LS Keep Alive Info(tenant_id=1026, LS_ID={id:1001}, Not_Master_Cnt=1, Near_To_GTS_Cnt=0, Other_Error_Cnt=0, Submit_Succ_Cnt=0, last_scn="{val:1737473575237244108, v:0}", last_lsn={lsn:3967819051}, last_gts={val:0, v:0}, min_start_scn="{val:0, v:0}", min_start_status=1, sys_ls_end_scn={val:0, v:0})
340438-[2025-01-22 10:11:25.905302] INFO [STORAGE.TRANS] get_cluster_version (ob_tenant_weak_read_cluster_version_mgr.cpp:166) [10233][T1025_TenantWea][T1025][Y0-0000000000000000-0-0] [lt=38] [WEAK_READ_SERVER_VERSION_MGR] compute version(tenant_id=1025, min_version={val:1737511885754801557, v:0}, base_version={val:1737511885506090838, v:0}, server_count=1, svr_array=[{addr:“172.16.130.3:2882”, version:{val:1737511885754801557, v:0}, valid_part_count:1, total_part_count:1, generate_tstamp:1737511885905280, is_skipped:false}], skip_server_count=0, skip_servers=[])
341002-[2025-01-22 10:11:25.914467] INFO [SQL.RESV] resolve_tenant (ob_alter_system_resolver.cpp:454) [8290][T1_L0_G0][T1][YB42AC108203-00062C4154C2E565-0-0] [lt=9] resolve tenants(affect_all=false, affect_all_user=false, affect_all_meta=false, tenant_ids=[1032])
341260:[2025-01-22 10:11:25.915667] INFO [SQL.ENG] execute (ob_alter_system_executor.cpp:224) [8290][T1_L0_G0][T1][YB42AC108203-00062C4154C2E565-0-0] [lt=23] finish do major freeze(ret=-4217, ret=“OB_MAJOR_FREEZE_NOT_ALLOW”, param={freeze_info_array:[{tenant_id:1032}], freeze_all:false, freeze_all_user:false, freeze_all_meta:false, transport:0x7fe141f17fb0}, merge_results=[-4217])

摘要

此文本将被隐藏

用诊断工具obdiag 对这个报错时间点前后5分钟的日志分析一下,https://www.oceanbase.com/docs/common-obdiag-cn-1000000002023121

例如:


obdiag analyze log --from "2023-10-08 10:25:00" --to "2023-10-08 11:30:00" \
  --config obcluster.servers.nodes[0].ip=xx.xx.xx.1 \
  --config obcluster.servers.nodes[1].ip=xx.xx.xx.xx.2 \
  --config obcluster.servers.global.ssh_username=test \
  --config obcluster.servers.global.ssh_password=****** \
  --config obcluster.servers.global.home_path=/home/admin/oceanbase

``1

Analyze OceanBase Online Log Summary:

±------------±---------±-----------±------------±----------±--------+
| Node | Status | FileName | ErrorCode | Message | Count |
+=============+==========+============+=============+===========+=========+
| 10.10.168.3 | PASS | | | | |
±------------±---------±-----------±------------±----------±--------+
For more details, please run cmd ’ cat /root/obdiag_analyze_pack_20250122113927/result_details.txt ’

Trace ID: 7b36844c-d872-11ef-be33-94292fcd9280
If you want to view detailed obdiag logs, please run: obdiag display-trace 7b36844c-d872-11ef-be33-94292fcd9280

把observer.log的日志 压缩发全点
按照下面取一下trace 日志
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;

你这个租户是备租户吗?

(帖子已被作者删除)

rootservice-YB42AC108203-00062C42D41E1E13-0-0.log (341 字节)
observer-YB42AC108203-00062C42D41E1E13-0-0.log (1.6 KB)

备租户