code: func (c *RawKVClient) DeleteRange(startKey []byte, endKey []byte) error {
  	start := time.Now()
  	var err error
  	defer func() {
  		var label = "delete_range"
  		if err != nil {
  			label += "_error"
  		}
  		metrics.TiKVRawkvCmdHistogram.WithLabelValues(label).Observe(time.Since(start).Seconds())
  	}()
  
  	// Process each affected region respectively
  	for !bytes.Equal(startKey, endKey) {
  		var resp *tikvrpc.Response
  		var actualEndKey []byte
  		resp, actualEndKey, err = c.sendDeleteRangeReq(startKey, endKey)
  		if err != nil {
  			return errors.Trace(err)
  		}
  		cmdResp := resp.RawDeleteRange
  		if cmdResp == nil {
  			return errors.Trace(ErrBodyMissing)
  		}
  		if cmdResp.GetError() != "" {
  			return errors.New(cmdResp.GetError())
  		}
  		startKey = actualEndKey
  	}
  
  	return nil
  }
docs: // DeleteRange deletes all key-value pairs in a range from TiKV