public void recordLastPolledTimestamp() {
    long currentTimestamp;
    long newTimestamp;

    do {
      currentTimestamp = lastPolledTimestamp.get();
      newTimestamp = Math.max(currentTimestamp, System.currentTimeMillis());
    } while (!lastPolledTimestamp.compareAndSet(currentTimestamp, newTimestamp));
  }
NOTE: To ensure idempotency, currently, it is only allowed to call this method within the
{@link ConcurrentHashMap#compute} method of inFlightEvents in {@link
SubscriptionPrefetchingQueue} or {@link SubscriptionPrefetchingQueue#cleanUp}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/SubscriptionEvent.java