private AtomicBoolean getSnapshotFlag(RaftGroupId groupId) {
    return snapshotFlag.computeIfAbsent(groupId, id -> new AtomicBoolean(false));
  }
Periodically woken up. Will check the snapshot condition and set the snapshot flag.
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/DiskGuardian.java