业务侧反馈在业务跑批时频繁收到这样的报错:
[INFO] 2025-04-15 09:47:11.528 - [taskAppId=TASK-96058-34550909-56355485]:[181] - -> time="2025-04-15 09:47:11" level=info msg="[MONITOR] queue size: 29800, count: 1944900, read rate/s: 64830.00"
[INFO] 2025-04-15 09:47:19.456 - [taskAppId=TASK-96058-34550909-56355485]:[181] - -> [mysql] 2025/04/15 09:47:19 packets.go:37: read tcp xxxx:51930->xxxx:4000: i/o timeout
[INFO] 2025-04-15 09:47:20.457 - [taskAppId=TASK-96058-34550909-56355485]:[181] - -> time="2025-04-15 09:47:19" level=warning msg="sql exec fail, err: invalid connection"
在跑批时 TiDB 也有如下的报错:
2025-04-15 09:40:05 (UTC+08:00)TiDB xxx:4000[session.go:3899] ["CRUCIAL OPERATION"] [conn=1523893894] [schemaVersion=166448] [cur_db=dj_report] [sql="ALTER TABLE xxx TRUNCATE PARTITION p20250414"] [user=xxx@xxx]
2025-04-15 09:40:06 (UTC+08:00)TiDB xxx:4000[ddl_worker.go:1023] ["run DDL job"] [worker="worker 1, tp general"] [category=ddl] [jobID=158756] [conn=1523893894] [category=ddl] [job="ID:158756, Type:truncate partition, State:queueing, SchemaState:public, SchemaID:69, TableID:15286, RowCount:0, ArgLen:0, start time: 2025-04-15 09:40:05.978 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"]
2025-04-15 09:40:06 (UTC+08:00)TiDB xxx:4000[ddl_worker.go:610] ["finish DDL job"] [worker="worker 1, tp general"] [category=ddl] [jobID=158756] [conn=1523893894] [job="ID:158756, Type:truncate partition, State:synced, SchemaState:none, SchemaID:69, TableID:15286, RowCount:0, ArgLen:1, start time: 2025-04-15 09:40:05.978 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"]
2025-04-15 09:41:45 (UTC+08:00)TiDB xxx:4000[region_request.go:1754] ["throwing pseudo region error due to no replica available"] [conn=1523893894] [session_alias=] [req-ts=457357735933247576] [req-type=Prewrite] [region="{ region id: 29430011, ver: 281784, confVer: 75759 }"] [replica-read-type=leader] [stale-read=false] [request-sender="{rpcError:<nil>,replicaSelector: replicaSelector{selectorStateStr: tryFollower, cacheRegionIsValid: false, replicaStatus: [peer: 29430012, store: 11, isEpochStale: false, attempts: 1, attempts_time: 676.5µs, replica-epoch: 2, store-epoch: 2, store-state: resolved, store-liveness-state: reachable peer: 29430013, store: 6, isEpochStale: false, attempts: 0, attempts_time: 0s, replica-epoch: 3, store-epoch: 3, store-state: resolved, store-liveness-state: reachable peer: 29430014, store: 5169885, isEpochStale: false, attempts: 0, attempts_time: 0s, replica-epoch: 3, store-epoch: 3, store-state: resolved, store-liveness-state: reachable]}}"] [total-round-stats="{total-backoff: 380ms, total-backoff-times: 13}"] [current-round-stats="{time: 128.9ms, backoff: 128ms, timeout: 30s, req-max-exec-timeout: 20s, retry-times: 1}"]
2025-04-15 09:41:45 (UTC+08:00)TiDB xxx:4000[region_request.go:1754] ["throwing pseudo region error due to no replica available"] [conn=1523893894] [session_alias=] [req-ts=457357735933247576] [req-type=Prewrite] [region="{ region id: 29430011, ver: 281784, confVer: 75759 }"] [replica-read-type=leader] [stale-read=false] [request-sender="{rpcError:<nil>,replicaSelector: replicaSelector{selectorStateStr: tryFollower, cacheRegionIsValid: false, replicaStatus: [peer: 29430012, store: 11, isEpochStale: false, attempts: 1, attempts_time: 663.4µs, replica-epoch: 2, store-epoch: 2, store-state: resolved, store-liveness-state: reachable peer: 29430013, store: 6, isEpochStale: false, attempts: 0, attempts_time: 0s, replica-epoch: 3, store-epoch: 3, store-state: resolved, store-liveness-state: reachable peer: 29430014, store: 5169885, isEpochStale: false, attempts: 0, attempts_time: 0s, replica-epoch: 3, store-epoch: 3, store-state: resolved, store-liveness-state: reachable]}}"] [total-round-stats="{total-backoff: 764ms, total-backoff-times: 15}"] [current-round-stats="{time: 257.4ms, backoff: 256ms, timeout: 30s, req-max-exec-timeout: 20s, retry-times: 1}"]
反复报 throwing pseudo region error due to no replica available
region 的状态也是正常的:
参考过这个帖子,业务侧也把客户端升级到了 >= 1.23.2 版本
想请教下为什么报错?有什么解决办法,谢谢