【详述】问题详细描述 使用 insert into select 时发现有数据丢失的情况。
【背景】做过哪些操作?
【业务影响】 数据丢失。
【是否存算分离】 否
【StarRocks版本】例如:2.5.21
【集群规模】例如:1fe + 5be
【机器信息】CPU虚拟核/内存/网卡,例如:32C/128G/万兆
【联系方式】 社区群3-melon
【附件】
查询 sql :select count(1) from ( select t1.date_created , t1.flow_no , t1.tds_flow_no , t1.user_no , "py_sys" as sys_type , t1.channel_id , t1.policy_code , t1.credit_apply_no , t2.status , t2.fund_code , t2.failrulecode as refuse_reason_level2 , t2.reason as refuse_reason_level3 , row_number() over(partition by t1.tds_flow_no, t2.fund_code order by t5.date_created desc) as rn_check , row_number() over(partition by t1.tds_flow_no, t2.fund_code order by t6.date_created desc) as rn_register , t5.msg as msg_check , t6.msg as msg_register from ( select date(date_created) as created_date , flow_no , tds_flow_no , user_no , channel_id , policy_code , credit_apply_no , date_created from lps.ap_fund_distribution_record where date(date_created) between '2024-06-01' and '2024-06-05' and policy_code in ("C00002", "C00003", "C00004", "H00001", "H00003") ) t1 left join ( select date(date_created) as created_date , flow_no , status , fundcode as fund_code , reason , failrulecode , date_created from dwd_analyze.ns_flow_user_rule_exec_ext_detail where date(date_created) between '2024-06-01' and '2024-06-05' ) t2 on t1.tds_flow_no = t2.flow_no left join ( select user_no , mobile_no_crypt from cis.u_user ) t4 on t1.user_no = t4.user_no left join ( select mobile_no_crypt , fund_code , state , msg , date_created from lps.ap_fund_check_request_his where state = 2 ) t5 on t4.mobile_no_crypt = t5.mobile_no_crypt and t2.fund_code = t5.fund_code and t2.date_created >= t5.date_created and t2.failrulecode in ("check_user_freeze_time", "check_user_pass_valid_time") left join ( select user_no , fund_code , state , msg , date_created from lps.ap_fund_request_his where biz_type = "REGISTER_USER" and state = 2 ) t6 on t1.user_no = t6.user_no and t2.fund_code = t6.fund_code and t2.date_created >= t6.date_created and (t2.failrulecode = "register_pass_valid_time" or (t2.failrulecode = "credit_apply_freeze_time" and reason = "注册冻结期拦截")) ) a where rn_check = 1 and rn_register = 1;
plan.txt (6.6 KB)
profile.txt (95.6 KB)
dump_file (42.0 KB)