code: func (m *memDbBuffer) Set(k Key, v []byte) error {
  	if len(v) == 0 {
  		return errors.Trace(ErrCannotSetNilValue)
  	}
  	if len(k)+len(v) > m.entrySizeLimit {
  		return ErrEntryTooLarge.GenWithStackByArgs(m.entrySizeLimit, len(k)+len(v))
  	}
  
  	err := m.db.Put(k, v)
  	if m.Size() > m.bufferSizeLimit {
  		return ErrTxnTooLarge.GenWithStack("transaction too large, size:%d", m.Size())
  	}
  	if m.Len() > int(m.bufferLenLimit) {
  		return ErrTxnTooLarge.GenWithStack("transaction too large, len:%d", m.Len())
  	}
  	return errors.Trace(err)
  }
docs: // Set associates key with value.