Re: Behavior of daos_kv_get for non-existent Keys

Chaarawi, Mohamad

Hi Steffen,

We have recently added conditional operations to the DAOS object and KV api to allow for such conditional operations:
Which would give you what you need.

However for the KV API, I actually see an issue where these flags are not properly set.
I will push a patch to fix this soon and let you know.


´╗┐On 8/24/20, 7:59 AM, " on behalf of Steffen Christgau" < on behalf of> wrote:

Hi everybody,

I'm experimenting with the (low level) DAOS Key Value API, i.e.
daos_kv_get and friends. For the get function, I observed that passing
an non-existent key returns both 0, indicating success, as well as an
"actual size of the value" of again 0.

However, it is also valid to put a key with a zero length value into the
KV store. That key is subsequently found when enumerating the names
inside the object (daos_kv_list).

Is this behavior of the get operation, i.e. returning success and an
empty (value), intended? If so, how can I check if a queried key really
existed other than by enumerating the (whole) object?

Regards, Steffen

Join to automatically receive all group messages.