@Override
  public void setCurrentState(ReplicaState state) {
    if (currentState != state) {
      logger.info("storeId = {}, State change from {} to {}", storeId, currentState, state);
      previousState = currentState;
      currentState = state;
    }
  }
@return The number of byte been written to log
ambry-store/src/main/java/com/github/ambry/store/BlobStore.java