TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
setup a cluster with:
upstream: pd/tikv/tidb/pump/drainer
downstream: tikdb with unistore
enable binlog by set[binlog] enable = true
enable pessimistic by set global tidb_txn_mode='pessimistic';
enable amend by set global tidb_enable_amend_pessimistic_txn = 1;
create init table:
create table t(c1 varchar(500), c2 int);
start 3 sessions:
---session1--- begin;
---session2--- begin;
---session1--- insert into t select 'abc', 10;
---session2--- insert into t select 'abc', 20;
---session3--- create unique index uk1 on t(c1);
---session1--- commit;
---session2--- update t set c1 = concat(c1, 'p') where c2 = 20;
---session2--- commit;
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
setup a cluster with:
upstream: pd/tikv/tidb/pump/drainer downstream: tikdb with unistore
enable binlog by set
[binlog] enable = true
enable pessimistic byset global tidb_txn_mode='pessimistic';
enable amend byset global tidb_enable_amend_pessimistic_txn = 1;
create init table:
create table t(c1 varchar(500), c2 int);
start 3 sessions:
2. What did you expect to see? (Required)
both upstream and downstream should be
3. What did you see instead (Required)
downstream only:
miss c2:20 record
and drainer exit with:
4. What is your TiDB version? (Required)
6.11's master tidb/tikv/pd/binlog