【 TiDB 版本】
TiDB v6.1.0
DM v6.1.0
【遇到的问题】
DM同步的时候出现单个key超过最大限制的错误,如下:
“errors”: [
{
“ErrCode”: 50000,
“ErrClass”: “not-set”,
“ErrScope”: “not-set”,
“ErrLevel”: “high”,
“Message”: “[kv:8025]entry too large, the max entry size is 6291456, the size of data is 7890542”,
“RawCause”: “”,
“Workaround”: “”
}
],
排查是否真的是TiDB的问题,生成一个大字段并插入TiDB:
[2022/07/04 09:15:22.423 +08:00] [INFO] [2pc.go:629] [“[BIG_TXN]”] [session=6284447824554729039] [“key sample”=748000000000000ad95f728000000000000003] [size=37119529] [keys=1] [puts=1] [dels=0] [locks=0] [checks=0] [txnStartTS=434345691549007898]
显示插入数据库是成功的,查询也是有数据的。TiDB相关参数如下:
+------+---------------------+--------------------------------------+-----------+
| Type | Instance | Name | Value |
+------+---------------------+--------------------------------------+-----------+
| tidb | xxxxx:4000 | performance.txn-entry-size-limit | 125829120 |
| tikv | xxxxx:20161 | raftstore.raft-entry-max-size | 128MiB |
+------+---------------------+--------------------------------------+-----------+
提了个bug:the 'txn-entry-size-limit' config is not effective in DM · Issue #6161 · pingcap/tiflow · GitHub