I am curious about how $currentDate works

Thank for replying :slight_smile:

I have one more question. If I use $currentDate when instances in group A take turns saving data, can I guarantee the relative chronological order between the saved data?

Let’s give an example. Let’s say we have instances 1 and 2 in group A, and data 1 and 2 need to be processed by instance 1 and 2, respectively. Let’s assume that data 1 and data 2 are imported into group A in order.

  1. Data #1 is consumed into instance #1.
  2. Instance #1 is trying to process data #1 and store it in the DB, but the save is being delayed due to some issue (network problem, etc.).
  3. Data #2 is consumed into instance #2.
  4. Instance #2 successfully saves data in the DB, and timestamp2 is recorded.
  5. The issue of instance #1 is resolved, and data #1 is saved to the DB, and timestamp1 is recorded.

Timestamp1 must not be less than timestamp2 in this process because the relative point in time at which data is stored is important.

Could $currentStamp solve this problem?