We have recently added conditional operations to the DAOS object and KV api to allow for such conditional operations: DAOS_COND_KEY_INSERT/UPDATE/FETCH/PUNCH (for the daos_kv_* API) Which would give you what you need.
Thanks for pointing that out, Mohamad.
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.
Great. Looking forward for a notification.
Just to be sure: Given that the API would work correctly, these conditional operations are passed with the flags parameter which are marked as "currently ignored"?!