code: func (info *BinlogInfo) WriteBinlog(clusterID uint64) error {
  	skip := atomic.LoadUint32(&skipBinlog)
  	if skip > 0 {
  		metrics.CriticalErrorCounter.Add(1)
  		return nil
  	}
  
  	if info.Client == nil {
  		return errors.New("pumps client is nil")
  	}
  
  	// it will retry in PumpsClient if write binlog fail.
  	err := info.Client.WriteBinlog(info.Data)
  	if err != nil {
  		logutil.Logger(context.Background()).Error("write binlog failed", zap.Error(err))
  		if atomic.LoadUint32(&ignoreError) == 1 {
  			logutil.Logger(context.Background()).Error("write binlog fail but error ignored")
  			metrics.CriticalErrorCounter.Add(1)
  			// If error happens once, we'll stop writing binlog.
  			atomic.CompareAndSwapUint32(&skipBinlog, skip, skip+1)
  			return nil
  		}
  
  		if strings.Contains(err.Error(), "received message larger than max") {
  			// This kind of error is not critical, return directly.
  			return errors.Errorf("binlog data is too large (%s)", err.Error())
  		}
  
  		return terror.ErrCritical.GenWithStackByArgs(err)
  	}
  
  	return nil
  }
docs: // WriteBinlog writes a binlog to Pump.