【 使用环境 】生产环境
【 OB or 其他组件 】
【 使用版本 】4.2.1
【问题描述】调用存储过程报4016 存储过程名为sp_querynotifylog,在如下日志
[2025-01-22 09:13:29.780456] INFO [PL] compile (ob_pl_compile.cpp:401) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=1] >>>>>>>>CG Time: (ret=-4016, routine.get_routine_id()=310180, routine.get_routine_name()=sp_querynotifylog, cg_end - resolve_end=4397)
[2025-01-22 09:13:29.780459] INFO [PL] compile (ob_pl_compile.cpp:404) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=3] >>>>>>>>Final Compile Routine Time: (ret=-4016, routine.get_routine_id()=310180, routine.get_routine_name()=sp_querynotifylog, final_end - init_start=6654)
[2025-01-22 09:13:29.780468] WDIAG [PL] compile (ob_pl_compile.cpp:254) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2][errcode=-4016] fail to exec compile(*routine, func_ast, func)(ret=-4016)
[2025-01-22 09:13:29.780527] WDIAG [PL] generate_pl_function (ob_pl.cpp:2548) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2][errcode=-4016] fail to exec compiler.compile(proc_id, *routine)(ret=-4016, proc_id=310180)
[2025-01-22 09:13:29.780529] INFO [PL] generate_pl_function (ob_pl.cpp:2552) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2] >>>>>>>>>>Compile Routine Time: (ret=-4016, proc_id=310180, compile_end - compile_start=6823, routine={ns:2, ref_count:1, tenant_schema_version:-1, sys_schema_version:-1, object_id:103539, dependency_tables:[], params_info:[], variables:[], default_idxs:[], function_name:“sp_querynotifylog”, priv_user:“root@%”})
[2025-01-22 09:13:29.780535] WDIAG [PL] get_pl_function (ob_pl.cpp:2365) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=6][errcode=-4016] fail to exec generate_pl_function(ctx, routine_id, cacheobj_guard)(ret=-4016, “routine_id”=“routine_id”, ::oceanbase::common::check_char_array(routine_id)=310180)
[2025-01-22 09:13:29.780538] WDIAG [PL] execute (ob_pl.cpp:2052) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2][errcode=-4016] fail to exec get_pl_function(ctx, *ctx.get_package_guard(), package_id, routine_id, subprogram_path, cacheobj_guard, local_routine)(ret=-4016, “routine_id”=“routine_id”, ::oceanbase::common::check_char_array(routine_id)=310180, “subprogram_path”=“subprogram_path”, ::oceanbase::common::check_char_array(subprogram_path)=[])
[2025-01-22 09:13:29.780548] WDIAG [SQL.PC] common_free (ob_lib_cache_object_manager.cpp:141) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=3][errcode=0] set logical del time(cache_obj->get_logical_del_time()=1257885581699, cache_obj->added_lc()=false, cache_obj->get_object_id()=103539, cache_obj->get_tenant_id()=1, lbt()=“0x125fd785 0xa9ad5de 0x4d7531e 0xa91fbbd 0x900ebeb 0xbe6491d 0xbc20335 0x4fecbe3 0x4d9d074 0x4d98e00 0x4f8a9b7 0x4d41be6 0x4d352e9 0x4d282ea 0x4d1135c 0x9e494f4 0x128cdbbf 0x7f81c84abeb6 0x7f81c852b02c”)
[2025-01-22 09:13:29.780551] INFO [SQL.PC] before_cache_evicted (ob_i_lib_cache_object.cpp:76) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=3] before_cache_evicted(this=0x7f81685f2178, this={ns:2, ref_count:0, tenant_schema_version:-1, sys_schema_version:-1, object_id:103539, dependency_tables:[], params_info:[], variables:[], default_idxs:[], function_name:“sp_querynotifylog”, priv_user:“root@%”})
[2025-01-22 09:13:29.782591] WDIAG [SQL.ENG] execute (ob_routine_executor.cpp:214) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=3][errcode=-4016] failed to execute pl(package_id=18446744073709551615, routine_id=310180, ret=-4016, pkg_id=-1)
[2025-01-22 09:13:29.782597] WDIAG [SQL] open_cmd (ob_result_set.cpp:99) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=5][errcode=-4016] execute cmd failed(ret=-4016)
[2025-01-22 09:13:29.782600] WDIAG [SQL] open (ob_result_set.cpp:158) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2][errcode=-4016] execute plan failed(ret=-4016)
[2025-01-22 09:13:29.782603] WDIAG [SERVER] response_result (ob_sync_cmd_driver.cpp:145) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2][errcode=-4016] close result set fail(cret=-4016)
[2025-01-22 09:13:29.782606] WDIAG [SERVER] after_func (ob_query_retry_ctrl.cpp:955) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2][errcode=-4016] [RETRY] check if need retry(v={force_local_retry:false, stmt_retry_times:0, local_retry_times:0, err_:-4016, err_:“OB_ERR_UNEXPECTED”, retry_type:0, client_ret:-4016}, need_retry=false, THIS_WORKER.can_retry()=true, v.ctx_.multi_stmt_item_={is_part_of_multi_stmt:false, seq_num:0, sql:“CALL sp_querynotifylog(‘1737388800’,‘1737475199’,‘0’,‘200’,‘E_GS_GPSDataUpdate;E_ST_UnusableTimeAlert;E_IVS_RaiseHand_AUTO;E_ST_SitTimeoutAlarm;E_PTZ_LockStatusChanged;E_IVS_BrightnessAbnormal_AUTO;E_IVS_BrightnessAbnormal_Warning_AUTO;E_ST_PersonPosition;E_IVS_ObjectDetect_Human_AUTO;E_IV_LowDensity’,‘201,201115200805306762;201,201115200225120911;201,201115204201255567;201,201115204285141647;201,201115203681161871;201,201115204184478351;201,201115203714716303;201,201115200361108111;201,201115200159781519;201,8e62ad1691d7e13b’)”, batched_queries:NULL, is_ps_mode:false, ab_cnt:0})
[2025-01-22 09:13:29.782613] WDIAG [SERVER] response_result (ob_sync_cmd_driver.cpp:151) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=6][errcode=-4016] result set open failed, check if need retry(ret=-4016, cli_ret=-4016, retry_ctrl_.need_retry()=0)
[2025-01-22 09:13:29.782617] INFO [SERVER] send_error_packet (obmp_packet_sender.cpp:319) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2] sending error packet(ob_error=-4016, client error=-4016, extra_err_info=NULL, lbt()=“0x125fd785 0xa191090 0xa13eaa2 0x4f8af09 0x4d41be6 0x4d352e9 0x4d282ea 0x4d1135c 0x9e494f4 0x128cdbbf 0x7f81c84abeb6 0x7f81c852b02c”)
[2025-01-22 09:13:29.782629] WDIAG [SERVER] do_process (obmp_query.cpp:808) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=3][errcode=-4016] execute query fail(ret=-4016, timeout_timestamp=1737868409773547)
[2025-01-22 09:13:29.782640] WDIAG [SQL.PC] common_free (ob_lib_cache_object_manager.cpp:141) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=3][errcode=0] set logical del time(cache_obj->get_logical_del_time()=1257885583792, cache_obj->added_lc()=false, cache_obj->get_object_id()=103538, cache_obj->get_tenant_id()=1, lbt()=“0x125fd785 0xa9ad5de 0x4d7531e 0xa91fbbd 0xdb6472f 0x4d4d79e 0x4d4a047 0x4d3d6c5 0x4d352e9 0x4d282ea 0x4d1135c 0x9e494f4 0x128cdbbf 0x7f81c84abeb6 0x7f81c852b02c”)
[2025-01-22 09:13:29.782643] INFO [SQL.PC] before_cache_evicted (ob_i_lib_cache_object.cpp:76) [775][T1_L0_G0][T1][YB427F000001-00062C31940FDA77-0-0] [lt=2] before_cache_evicted(this=0x7f8181c94050, this={can_direct_use_param:false, package_id:18446744073709551615, routine_id:310180, out_idx:[], out_name:[], out_type:[], out_type_name:[], out_type_owner:[], is_udt_routine:false})