@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "MT_CORRECTNESS",
      justification = "Intentional")
  void includeTimestamp(final long timestamp) {
    long initialMinTimestamp = getMin();
    if (timestamp < initialMinTimestamp) {
      long curMinTimestamp = initialMinTimestamp;
      while (timestamp < curMinTimestamp) {
        if (!compareAndSetMin(curMinTimestamp, timestamp)) {
          curMinTimestamp = getMin();
        } else {
          // successfully set minimumTimestamp, break.
          break;
        }
      }

      // When it reaches here, there are two possibilities:
      // 1). timestamp >= curMinTimestamp, someone already sets the minimumTimestamp. In this case,
      // it still needs to check if initialMinTimestamp == INITIAL_MIN_TIMESTAMP to see
      // if it needs to update minimumTimestamp. Someone may already set both
      // minimumTimestamp/minimumTimestamp to the same value(curMinTimestamp),
      // need to check if maximumTimestamp needs to be updated.
      // 2). timestamp < curMinTimestamp, it sets the minimumTimestamp successfully.
      // In this case,it still needs to check if initialMinTimestamp == INITIAL_MIN_TIMESTAMP
      // to see if it needs to set maximumTimestamp.
      if (initialMinTimestamp != INITIAL_MIN_TIMESTAMP) {
        // Someone already sets minimumTimestamp and timestamp is less than minimumTimestamp.
        // In this case, no need to set maximumTimestamp as it will be set to at least
        // initialMinTimestamp.
        return;
      }
    }

    long curMaxTimestamp = getMax();

    if (timestamp > curMaxTimestamp) {
      while (timestamp > curMaxTimestamp) {
        if (!compareAndSetMax(curMaxTimestamp, timestamp)) {
          curMaxTimestamp = getMax();
        } else {
          // successfully set maximumTimestamp, break
          break;
        }
      }
    }
  }
If required, update the current TimestampRange to include timestamp
@param timestamp the timestamp value to include
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/TimeRangeTracker.java