@Override
    public void run() {
      try {
        if (!cancelled) {
          long now = System.currentTimeMillis();
          validDataSize.set(getValidSize(new TimeRange(now - logSegmentForecastOffsetMs, getBucketSpanTimeInMs())));
        }
      } catch (StoreException e) {
        if (e.getErrorCode().equals(StoreErrorCodes.StoreShuttingDown)) {
          logger.info("Store is currently shutting down on store: {}", storeId);
          return;
        }
        logger.error("Failed to get validDataSize on store: {}", storeId, e);
      }
    }
Runner that get the valid data size asynchronously and cached in validDataSize.
ambry-store/src/main/java/com/github/ambry/store/BlobStoreStats.java