code: func (worker *copIteratorWorker) handleTask(bo *Backoffer, task *copTask, respCh chan<- *copResponse) {
  	defer func() {
  		r := recover()
  		if r != nil {
  			logutil.Logger(context.Background()).Error("copIteratorWork meet panic",
  				zap.Reflect("r", r),
  				zap.Stack("stack trace"))
  			resp := &copResponse{err: errors.Errorf("%v", r)}
  			worker.sendToRespCh(resp, task.respChan)
  		}
  	}()
  	remainTasks := []*copTask{task}
  	for len(remainTasks) > 0 {
  		tasks, err := worker.handleTaskOnce(bo, remainTasks[0], respCh)
  		if err != nil {
  			resp := &copResponse{err: errors.Trace(err)}
  			worker.sendToRespCh(resp, respCh)
  			return
  		}
  		if len(tasks) > 0 {
  			remainTasks = append(tasks, remainTasks[1:]...)
  		} else {
  			remainTasks = remainTasks[1:]
  		}
  	}
  }
docs: // handleTask handles single copTask, sends the result to channel, retry automatically on error.