tidb icon indicating copy to clipboard operation
tidb copied to clipboard

flashback: the insert transaction can still be committed which started before flashback command

Open snowballbear opened this issue 3 years ago • 2 comments

Bug Report

1. Minimal reproduce step (Required)

steps : https://pingcap.feishu.cn/docx/doxcndYwwev0Aolq35Fsi1qv0Gg 2022-09-19 case2 session2

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

session2 can't commit successfully

3. What did you see instead (Required)

session2 committed successfully

snowballbear avatar Sep 19 '22 10:09 snowballbear

TiKV will fix this issue, could get detail from https://github.com/tikv/tikv/issues/13493

Defined2014 avatar Sep 20 '22 06:09 Defined2014

TiKV will fix this issue, could get detail from tikv/tikv#13493

After discussed, we decided to change flashback to two phases. In the first phase, lock all regions. Then rewrite old value to TiKV in the second phase.

TiDB will clean all running Txns between first phase and second phase, make insert stmts failed.

Defined2014 avatar Sep 22 '22 05:09 Defined2014