Does this support checking the key if exist in the DB without returning the value / updating the cache?
I have quickly checked and was unable to find the corresponding api in rocksdb. Have you checked there?
We can add a method in the rust bindings, but I think that it makes little sense without rocksdb support.
Feel free to reopen the issue if I have missed something.
Rocksdb does support this feature.
See other Rust rocksdb implementation
Other references: https://www.codota.com/code/java/methods/org.rocksdb.RocksDB/keyMayExist
Thanks, for some reason I was unable to find these methods: https://github.com/facebook/rocksdb/blob/master/include/rocksdb/db.h#L653
As far as I can see, these functions aren't exposed through the C API. I have made the pull request: https://github.com/facebook/rocksdb/pull/7021
@DarkEld3r hey, the methods exposed in your PR still read the values, so they are not that different from get
IIUC. Do you think it's possible to implement a check w/o loading values into memory?
Also KeyMightExist
can return false positives IIUC.
return boolean value indicating if key does not exist or might exist.
Ah, sorry, I misread the comment. So by supplying null
value_found
it actually doesn't read the value.
@stanislav-tkach your PR facebook/rocksdb#7021 is already merge. Can we add support?
@rohitjoshi The latest (6.11.4) rocksdb release was at Jul 20 and unfortunately it doesn't include my changes. I suppose we need to wait for the next release.
Any update on this?
As far as I can see, the latest RocksDB release includes the required C-API changes, but we are still using the 6.11.4 version.