@Override
  public boolean exitMaintenanceMode() {
    boolean exitMaintenanceMode = false;
    synchronized (helixAdministrationLock) {
      if (!inMaintenanceMode) {
        throw new IllegalStateException("Cluster is not in maintenance mode");
      }
      try {
        MaintenanceRecord record = getLastMaintenanceRecord();
        if (record.reason.equals(maintenanceModeReason)) {
          helixAdmin.manuallyEnableMaintenanceMode(clusterName, false, maintenanceModeReason, null);
          logger.info("Cluster {} exits maintenance mode: {}", clusterName, maintenanceModeReason);
        } else {
          logger.error("Maintenance record is not expected, operation type: {}, reason: {}", record.operationType,
              record.reason);
        }
        inMaintenanceMode = false;
        maintenanceModeReason = null;
        exitMaintenanceMode = true;
      } catch (Exception e) {
        logger.error("Exception occurred when entering maintenance mode", e);
      }
    }
    return exitMaintenanceMode;
  }
Given a map of old disks and new disks, swaps the old disks with the new disks in the DataNodeConfig,
and persists the resulting changes to Helix.
@param newDiskMapping A map of old disks to new disks.
@return {@code true} if the disks order was successfully updated, {@code false} otherwise.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixParticipant.java