This seems like it could also be an issue with the C API.
What is the status on this bug? I dearly need this for a project of mine. Can I help with anything?
@tokahuke Unchanged since it was filed. What would help is confirmation on whether this is a bug with this Rust wrapper library, or if it is an issue with the upstream Facebook RocksDB library. If it is upstream, it's likely nothing we can address here and an issue would need to be opened against the upstream library.
For the folks who are seeing this bug: _How are you opening the database?_
I encountered the problem and did see it go away if I use DB::open_cf_descriptors()
, instead of DB::open_cf()
. I believe the underlying issue is that DB::open_cf()
applies default Options to any column families it creates. Default Options will not include a merge operator.
Unless I'm mistaken:
set_merge_operator()
on the column family's Options, not the DB's Options. In order to do that, open_cf_descriptors()
must be called instead of open_cf()
. Hope this helps.
Most helpful comment
For the folks who are seeing this bug: _How are you opening the database?_
I encountered the problem and did see it go away if I use
DB::open_cf_descriptors()
, instead ofDB::open_cf()
. I believe the underlying issue is thatDB::open_cf()
applies default Options to any column families it creates. Default Options will not include a merge operator.Unless I'm mistaken:
set_merge_operator()
on the column family's Options, not the DB's Options. In order to do that,open_cf_descriptors()
must be called instead ofopen_cf()
. Hope this helps.