tidb icon indicating copy to clipboard operation
tidb copied to clipboard

TIDB-SYNCER BNILOG

Open dbaspace opened this issue 8 years ago • 8 comments

2018-04-04 09:51:58 1 3.528905 3.528905 3.528905 3.528905 0 3.528905 6.5e-05 6.5e-05 6.5e-05 6.5e-05 0 6.5e-05 1 1 1 1 0 1 1.223838e+06 1.223838e+06 1.223838e+06 1.223838e+06 0 1.223838e+06 ]][error]Error 1118: entry too large, size: 7719384 2018/04/05 19:30:44 syncer.go:862: [info] [syncer]total events = 260, total tps = 2, recent tps = 0, master-binlog = (mysql-bin.000020, 985654539), master-binlog-gtid=, syncer-binlog = (mysql-bin.000020, 939640289), syncer-binlog-gtid = 2018/04/05 19:31:12 syncer.go:370: [fatal] Error 1118: entry too large, size: 7719384 /home/jenkins/workspace/build_tidb_enterprise_tools_master/go/src/github.com/pingcap/tidb-enterprise-tools/syncer/db.go:134: /home/jenkins/workspace/build_tidb_enterprise_tools_master/go/src/github.com/pingcap/tidb-enterprise-tools/syncer/db.go:101:

dbaspace avatar Apr 05 '18 11:04 dbaspace

set @@tidb_batch_insert=on; set @@tidb_batch_delete=on; 通过他们2个来控制?

dbaspace avatar Apr 05 '18 11:04 dbaspace

Thanks for your feedback! open set @@session.tidb_batch_insert=1 close set @@session.tidb_batch_insert=0 more questions can be viewed FAQ.

ciscoxll avatar Apr 05 '18 14:04 ciscoxll

batch = 10 tidb_batch_insert=1 tidb_batch_delete=1 in config.toml 根本不可以,,,在配置文件里 加了也不可以

dbaspace avatar Apr 05 '18 14:04 dbaspace

@dbaspace Please refer to the FAQ.

There are a few constraints in TiDB:

Each Key-Value entry is no more than 6MB
The total number of Key-Value entry is no more than 300,000 rows
The total size of Key-Value entry is no more than 100MB

The error message in you log shows Error 1118: entry too large. So I think there is a row in the binlog exceed 6MB. which is not allowed in TiDB. So there is no way to sync it into TiDB.

The only thing you can do is skipping that binlog entry.

shenli avatar Apr 05 '18 14:04 shenli

2018/04/05 22:32:58 syncer.go:370: [fatal] Error 1118: entry too large, size: 7719384 跳过.....你发的这个 看过了 ,不可能因为大事务就跳过BINLOG,,,,,

dbaspace avatar Apr 05 '18 14:04 dbaspace

The constraints are hardcoded in TiDB. Too large rows will hurt the performance and the stability of TiKV cluster. So skipping the binlog entry is the only way for your scenario.

shenli avatar Apr 05 '18 14:04 shenli

不可能因为线上有大事务,就跳过的。不过还好给测试出来.....

dbaspace avatar Apr 05 '18 15:04 dbaspace

公司的数据 经常有大事务操作,这就导致一个问题了,继续测试其他可能的问题

dbaspace avatar Apr 05 '18 15:04 dbaspace