Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Auto-retry on PD crash can *also* cause lost updates, read skew #10076
As noted in #10075, TiDB loses updates by default thanks to an auto-retry mechanism. The documentation says you can disable this mechanism by setting
I suggest disabling this retry mechanism by default as well, and, going forward, modify it to only retry transactions which can be safely re-applied.
In addition, setting
With Jepsen 8c4f1101510b382266a3b8d3fdaa7adfc60d9d9a, run
The total of all accounts should be constant.
Shortly after the recovery from a PD crash affecting a majority of PD nodes, account balances can briefly fluctuate. This anomaly is not a transient read phenomenon; logical state is corrupted. We believe this represents another case of lost updates. http://jepsen.io.s3.amazonaws.com/analyses/tidb-2.1.7/20190408T132351-pd-auto-retry.zip
referenced this issue
Apr 8, 2019
Hi @aphyr ,
The way to completely disable transaction automatic retry in TiDB is to set