code: func isRetryNeeded(err error, fn string, key string, retryCount int) (bool, error) {
  	switch err {
  	case kvdb.ErrNotSupported, kvdb.ErrWatchStopped, kvdb.ErrNotFound, kvdb.ErrExist, kvdb.ErrUnmarshal, kvdb.ErrValueMismatch, kvdb.ErrModified:
  		// For all known kvdb errors no retry is needed
  		return false, err
  	case rpctypes.ErrGRPCEmptyKey:
  		return false, kvdb.ErrNotFound
  	default:
  		// For all other errors retry
  		logrus.Errorf("[%v: %v] kvdb error: %v, retry count %v \n", fn, key, err, retryCount)
  		return true, err
  	}
  }
docs: // isRetryNeeded checks if for the given error does a kvdb retry required.
  // It returns the provided error.