tikv / agatedb

A persistent key-value storage in rust.
Apache License 2.0
835 stars 77 forks source link

Feature Request: get key only #165

Open zhangjinpeng87 opened 2 years ago

zhangjinpeng87 commented 2 years ago

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.