code: private void retry(String subTaskSpecId, MonitorEntry monitorEntry, TaskStatusPlus lastFailedTaskStatus)
    {
      synchronized (startStopLock) {
        if (running) {
          final SubTaskSpec<T> spec = monitorEntry.spec;
          final T task = spec.newSubTask(monitorEntry.taskHistory.size() + 1);
          log.info("Submitting a new task[%s] for retrying spec[%s]", task.getId(), spec.getId());
          indexingServiceClient.runTask(task);
          incrementNumRunningTasks();
  
          runningTasks.put(
              subTaskSpecId,
              monitorEntry.withNewRunningTask(
                  task,
                  indexingServiceClient.getTaskStatus(task.getId()).getStatus(),
                  lastFailedTaskStatus
              )
          );
        }
      }
    }
docs: Submit a retry task for a failed spec. This method should be called inside of the
  {@link java.util.concurrent.Callable} executed by {@link #taskStatusChecker}.