private ServerErrorCode handleRemoveStoreRequest(PartitionId partitionId) throws StoreException, IOException {
    ServerErrorCode errorCode = ServerErrorCode.NoError;
    ReplicaId replicaId = storeManager.getReplica(partitionId.toPathString());
    if (replicaId == null) {
      logger.error("{} doesn't exist on current node", partitionId);
      return ServerErrorCode.PartitionUnknown;
    }
    // Attempt to remove replica from stats manager. If replica doesn't exist, log info but don't fail the request
    statsManager.removeReplica(replicaId);
    // Attempt to remove replica from replication manager. If replica doesn't exist, log info but don't fail the request
    ((ReplicationManager) replicationEngine).removeReplica(replicaId);
    Store store = ((StorageManager) storeManager).getStore(partitionId, true);
    // Attempt to remove store from storage manager.
    if (storeManager.removeBlobStore(partitionId) && store != null) {
      for (ReplicaStatusDelegate replicaStatusDelegate : ((BlobStore) store).getReplicaStatusDelegates()) {
        // Remove store from sealed and stopped list (if present)
        logger.info("Removing store from sealed and stopped list(if present)");
        replicaStatusDelegate.unseal(replicaId);
        replicaStatusDelegate.unmarkStopped(Collections.singletonList(replicaId));
      }
    } else {
      errorCode = ServerErrorCode.UnknownError;
    }
    return errorCode;
  }
Handles admin request that removes a BlobStore from current node
@param partitionId the {@link PartitionId} associated with BlobStore
@return {@link ServerErrorCode} represents result of handling admin request.
ambry-server/src/main/java/com/github/ambry/server/AmbryServerRequests.java