// mvccDecode parses the origin key and version of an encoded key, if the encoded key is a meta key,
// just returns the origin key.
mvccDecode parses the origin key and version of an encoded key, if the encoded key is a meta key,
just returns the origin key.
// mvccDecode parses the origin key and version of an encoded key if the encoded key is a meta key // just returns the origin key .
func mvccDecode(encodedKey []byte) ([]byte, uint64, error) {
	remainBytes, key, err := codec.DecodeBytes(encodedKey, nil)
	if err != nil {
		return nil, 0, errors.Trace(err)
	}
	if len(remainBytes) == 0 {
		return key, 0, nil
	}
	var ver uint64
	remainBytes, ver, err = codec.DecodeUintDesc(remainBytes)
	if err != nil {
		return nil, 0, errors.Trace(err)
	}
	if len(remainBytes) != 0 {
		return nil, 0, ErrInvalidEncodedKey
	}
	return key, ver, nil
}
func mvccDecode ( encodedKey [ ] byte ) ( [ ] byte , uint64 , error ) { remainBytes , key , err := codec . DecodeBytes ( encodedKey , nil ) if err != nil { return nil , 0 , errors . Trace ( err ) } if len ( remainBytes ) == 0 { return key , 0 , nil } var ver uint64 remainBytes , ver , err = codec . DecodeUintDesc ( remainBytes ) if err != nil { return nil , 0 , errors . Trace ( err ) } if len ( remainBytes ) != 0 { return nil , 0 , ErrInvalidEncodedKey } return key , ver , nil }
mvccDecode parses the origin key and version of an encoded key, if the encoded key is a meta key,
just returns the origin key.
mvccDecode parses the origin key and version of an encoded key if the encoded key is a meta key just returns the origin key .
// Skip DataPrefix // should never happen // if it's meta key // should never happen