You can try to reduce the number of tables to be created in a batch by setting --ddl-batch-size
to 128
or a smaller value.
When using BR to restore the backup data with the value of [--ddl-batch-size
](Batch Create Table | PingCAP Docs to use) greater than 1
, TiDB writes a DDL job of table creation to the DDL jobs queue that is maintained by TiKV. At this time, the total size of all tables schema sent by TiDB at one time should not exceed 6 MB, because the maximum value of job messages is 6 MB
by default (it is not recommended to modify this value. For details, see txn-entry-size-limit
and raft-entry-max-size
). Therefore, if you set --ddl-batch-size
to an excessively large value, the schema size of the tables sent by TiDB in a batch at one time exceeds the specified value, which causes BR to report the entry too large, the max entry size is 6291456, the size of data is 7690800
error.