# TSO Assignment: TSO Concepts

+ TSO is a global timestamp
+ It consists of physical time and logical time 

------------------------------------------------------------------------------
TSO is a global timestamp, and it is the cornerstone of TiDB's distributed transaction. Therefore, for PD, we first need to ensure that it can quickly and massively allocate TSO to transaction. At the same time, we also need to ensure that the assigned TSO must increase monotonically, and there is no possibility of a rollback.

TSO is an integer of INT64, which consists of two parts: physical time + logical time. The physical time is the current unix time in millisecond, and the logical time is a counter for the maximum 1 << 18. In other words, within 1 millisecond, PD can allocate up to 262144 TSO, which satisfies the majority of situations.