Questions about the Time Window in Chapter PD of Lesson 04 in Course 302?

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

Original topic: 302课程Lesson04 PD章节时间窗口的疑问?

| username: OnTheRoad

According to the description in the video: “PD allocates all TSOs within 3 seconds to the TiDB Server (Client) at once. The TiDB Server first uses the TSOs within these 3 seconds, and after they are used up, it requests the next 3-second interval of TSOs from PD.” Is there any problem with this description? How can global order be ensured in a distributed system according to this description?

Or, based on the description in the video, consider the following scenario:

  1. At 10:00:00.000, TiDB Server1 requests a TSO, and PD pre-allocates TSOs between 10:00:00.000 and 10:00:03.000 to it, storing 10:00:03.000 in etcd.

  2. At 10:00:01.000, TiDB Server2 requests a TSO, and PD reads etcd, then pre-allocates TSOs between 10:00:03.000 and 10:00:06.000 to it. However, the physical clock of the TSO is in milliseconds of Unix time, which should be 10:00:01.000. Isn’t this contradictory?