pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.2k stars 5.84k forks source link

the 'txn-entry-size-limit' config is not work #35903

Closed zwathz closed 2 years ago

zwathz commented 2 years ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

TiDB config:

+------+---------------------+--------------------------------------+-----------+
| Type | Instance            | Name                                 | Value     |
+------+---------------------+--------------------------------------+-----------+
| tidb | xxxxx:4000 | performance.txn-entry-size-limit     | 125829120 |
| tikv | xxxxx:20161 | raftstore.raft-entry-max-size        | 128MiB    |
+------+---------------------+--------------------------------------+-----------+

DM error:

"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": ""
      }
],

2. What did you expect to see? (Required)

DM task work normally.

3. What did you see instead (Required)

DM task get an error.

4. What is your TiDB version? (Required)

MySQL [(none)]> SELECT tidb_version()\G 1. row tidb_version(): Release Version: v6.1.0 Edition: Community Git Commit Hash: 1a89decdb192cbdce6a7b0020d71128bc964d30f Git Branch: heads/refs/tags/v6.1.0 UTC Build Time: 2022-06-05 05:15:11 GoVersion: go1.18.2 Race Enabled: false TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 Check Table Before Drop: false 1 row in set (0.00 sec)

zwathz commented 2 years ago

generate a big key and insert into 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]

the insert is successed, so this problem may caused by dm (dm v6.1.0)

zwathz commented 2 years ago

this is dm debug, i resubmit in: https://github.com/pingcap/tiflow/issues/6161