【 TiDB 使用环境】生产环境 /测试/ Poc
生产环境
【 TiDB 版本】v5.4.2
【遇到的问题】
使用dm从上游mysql 同步到tidb,突然昨天同步延迟增加,
看tidb cluster_processlist进程,发现一堆的写入操作堆积
REPLACE INTO
weplayzy.
dd_recommend_new (
看tidb 日志提示 Region is unavailable
[2022/11/02 15:29:58.257 +08:00] [WARN] [backoff.go:152] ["regionMiss backoffer.maxSleep 40000ms is exceeded, errors:\nepoch_not_match:<> at 2022-11-02T15:29:56.63521457+08:00\nepoch_not_match:<> at 2022-11-02T15:29:57.528003335+08:00\nepoch_not_match:<> at 2022-11-02T15:29:58.257138997+08:00"]
[2022/11/02 15:29:58.257 +08:00] [WARN] [session.go:1719] ["run statement failed"] [conn=5429] [schemaVersion=423853] [error="[tikv:9005]Region is unavailable"] [session="{\n \"currDBName\": \"\",\n \"id\": 5429,\n \"status\": 3,\n \"strictMode\": false,\n \"txn\": \"437092125073735682\",\n \"user\": {\n \"Username\": \"tidb_user\",\n \"Hostname\": \"10.0.8.183\",\n \"CurrentUser\": false,\n \"AuthUsername\": \"tidb_user\",\n \"AuthHostname\": \"%\"\n }\n}"]
[2022/11/02 15:29:58.257 +08:00] [INFO] [conn.go:1117] ["command dispatched failed"] [conn=5429] [connInfo="id:5429, addr:10.0.8.183:30432 status:11, collation:utf8mb4_general_ci, user:tidb_user"] [command=Query] [status="inTxn:1, autocommit:1"] [sql="REPLACE INTO `weplayzy`.`dd_recommend_new` (`id`,`god_uid`,`category_id`,`online_score`,`order_score`,`time_score`,`pay_score`,`gift_score`,`price_score`,`game_price_score`,`fun_price_score`,`single_score`,`expired_score`,`speech_score`,`createtime_score`,`star_score`,`god_click_score`,`chat_num_score`,`chat_rate_score`,`room_click_score`,`room_enter_pay_score`,`order_all_score`,`score`,`score_rank`,`final_rank`,`nickname`,`update_time`) VALUES (12714,15082961,56,0,0,0,0,0,0.5599651414767486,0.5599651414767486,0,0,0,0,0.7223192902226421,0,0,0,0,0,0,0,0,3144,3144,_binary'兔啊兔',_binary'2022-11-01 14:00:48')"] [txn_mode=OPTIMISTIC] [err="[tikv:9005]Region is unavailable"]
此时查询 weplayzy
.dd_recommend_new
卡住
select * from weplayzy
.dd_recommend_new
limit 10;
请问是 weplayzy
.dd_recommend_new
数据所在的Region unavailable ? 这种情况如何处理