@Override
  public void onError() {
    int count = failureCount.incrementAndGet();
    if (count >= failureCountThreshold) {
      if (count == failureCountThreshold) {
        logger.info("Resource {} has gone down", resource);
      }
      logger.trace("Resource {} remains in down state at time {}; adding downtime of {} ms", resource,
          time.milliseconds(), retryBackoffMs);
      downUntil.set(time.milliseconds() + retryBackoffMs);
    }
  }
On an error, if the failureCount is greater than the threshold, mark the node as down.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/FixedBackoffResourceStatePolicy.java