@Override
    public void onPartitionBecomeBootstrapFromPreBootstrap(String partitionName) {
      ReplicaId replica = partitionNameToReplicaId.get(partitionName);

      if (replica == null) {
        throw new StateTransitionException("Store not initialized", StoreNotInitialized);
      }

      Store store = getInitializedStore(replica.getPartitionId());
      if (store == null) {
        throw new StateTransitionException("Store not initialized", StoreNotInitialized);
      }

      // if store is not already started, we start the store by loading it.
      if (!store.isStarted()) {
        if (!loadBlobStore(replica)) {
          throw new StateTransitionException("loading failed for store",
              StateTransitionException.TransitionErrorCode.StoreNotStarted);
        }
      }

      if (isPrimaryClusterManagerListener) {
        // Only update store state if this is a state transition for primary participant. Since replication Manager
        // which eventually moves this state to STANDBY/LEADER only listens to primary participant, store state gets
        // stuck in BOOTSTRAP if this is updated by second participant listener too
        ReplicaState currentState = store.getCurrentState();
        if (currentState != ReplicaState.LEADER && currentState != ReplicaState.STANDBY) {
          // Only set the current state to BOOTSTRAP when it's not LEADER or STANDBY
          store.setCurrentState(ReplicaState.BOOTSTRAP);
        }
      }
    }
Constructor
@param isPrimaryClusterManagerListener Indicates whether it's a listener object for primary helix cluster-manager
ambry-store/src/main/java/com/github/ambry/store/StorageManager.java