Understanding AsyncCommit

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 关于AsyncCommit的理解

| username: todoer

In this document, there is a sentence that I have always been unable to understand:
“This timestamp will not be used to update Max TS, so it is impossible for an equal situation to occur.”
Can any expert help explain this?

| username: Kongdom | Original post link

The sequentiality requirement means that the logical order of events cannot violate the physical order. Specifically, for two transactions T1 and T2, if T2 starts to commit only after T1 has committed, then logically T1’s commit should occur before T2’s, meaning T1’s Commit TS should be less than T2’s Commit TS. 3

To ensure this feature, TiDB obtains a timestamp from PD TSO as the minimum constraint for Min Commit TS before prewriting. Due to the real-time guarantee mentioned earlier, the timestamp obtained by T2 before prewriting must be greater than or equal to T1’s Commit TS, and this timestamp will not be used to update Max TS, so it is impossible for them to be equal. Therefore, we can ensure that T2’s Commit TS is greater than T1’s Commit TS, thus satisfying the sequentiality requirement.

It should be understood in conjunction with the example in the article. When transaction T1 prewrites, the timestamp is 6, and transaction T2 reads before T1 prewrites. Simply put, multi-version reads will only read the version corresponding to the timestamp.

| username: todoer | Original post link

I don’t understand.
This is just an example of snapshot isolation; I am asking about serializability.
Suppose there are two transactions, transaction T1 modifies x, and transaction T2 modifies y. After T1 obtains a timestamp from TSO, another transaction obtains TSO t1 to read x, so the Max TS of the region where x is located is t1. After T1 prewrites, the Min Commit TS is t1 + 1. y and x are not in the same region, and the Max TS of this region is less than t1 (which is very likely). After T1 commits, T2 obtains a timestamp t1 + 1 from TSO, so T2’s Commit TS is obviously t1 + 1.
It can be seen that T1 and T2 have the same Commit TS. Why does the article say that there will be no equal situation?