Some times we just want to check if a key is existed in the DB, for example when we call transaction put to insert a row to TiKV we need to check if the key exist(in TiKV we call it write conflict check).
Currently we use get to check if the key exist, but the get will also return the value which will cost extra memcpy. If we can add a key only read option for get, we can eliminate the memcpy of value part.
Some times we just want to check if a key is existed in the DB, for example when we call transaction put to insert a row to TiKV we need to check if the key exist(in TiKV we call it
write conflict check
).Currently we use
get
to check if the key exist, but theget
will also return the value which will cost extra memcpy. If we can add akey only
read option for get, we can eliminate the memcpy of value part.