Empty value is not supported
It is a historical problem. This client is extracted from TiDB. In TiDB, every key has a non-empty value. In the implementation, the client treats an empty value as the key does not exist, and it also rejects putting a pair with empty value.
But TiKV actually supports a key with zero-length value. The user can put a key with an empty value with another client (e.g. client-rust). Then, they will find the key does not exist when reading with this client.
cc @andylokandy @disksing
The problem is not as simple as it seems, because client's unionstore(memberbuffer) also uses empty value to indicate deletion.
Maybe we can distinguish them via []byte{nil} and []byte("").
seems solved by https://github.com/tikv/client-go/pull/612
now we only support nil value for rawkv API. txnkv still disallows empty value.