code: void removeOutStandingDatanodes(boolean logOutStandingOnly) {
      try {
        removeOutstandingDatanodesInternal(outStandingHeartbeats, logOutStandingOnly);
        removeOutstandingDatanodesInternal(outStandingReports, logOutStandingOnly);
      } catch (Exception e) {
        LOG.warn(
            "Failover - caught exception when removing outstanding datanodes", e);
      }
    }
docs: This function as a whole need to be synchronized since it is invoked by
  leave().