Closed you06 closed 2 years ago
@you06 an interesting question:
If I have 3 regions which leaders in one node, and now a transaction related to all these 3 regions, will TiDB apply it in 1PC or 2PC? In either way, how?
@you06 an interesting question:
If I have 3 regions which leaders in one node, and now a transaction related to all these 3 regions, will TiDB apply it in 1PC or 2PC? In either way, how?
2PC (either old 2PC or async commit). That's because our current implementation of 1PC depends on the atomicity of single write batch on a single region. If there are multiple regions involved, we can't provide the atomicity.
https://github.com/pingcap/tidb-dev-guide/blob/master/src/understand-tidb/1pc.md cc @MyonKeminta @tisonkun