@Override
    public void onPartitionBecomeStandbyFromBootstrap(String partitionName) {
      // This callback will be invoked after ReplicationManager's callback to transition from bootstrap to standby
      // So if we are here, the partition is already standby.
      //
      // In onPartitionBecomeBootstrap callback, we add the blob store to storage manager, which would add this blob
      // store to disk manager and the respective compaction manager. However, we disabled compaction for this blob
      // store since replication should only copy live blobs so there is not much compaction to do. Now we finished
      // bootstrap here, we should reenable compaction.
      ReplicaId replica = partitionNameToReplicaId.get(partitionName);
      if (replica == null) {
        throw new StateTransitionException("Replica " + partitionName + " is not found on current node",
            ReplicaNotFound);
      }
      // Operation to enable compaction is idempotent
      if (!controlCompactionForBlobStoreStub(replica.getPartitionId(), true)) {
        logger.error("Fail to enable compaction for blob store {}", replica.getReplicaPath());
        throw new StateTransitionException("Replica " + partitionName + " can't enable compaction",
            ReplicaOperationFailure);
      } else {
        logger.info("Compaction is successfully enabled on store {}", partitionName);
      }
    }
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