Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

column families do not work in conjunction with a merge operator #29

Open
spacejam opened this issue Oct 8, 2015 · 3 comments
Open
Labels

Comments

@spacejam
Copy link
Member

spacejam commented Oct 8, 2015

This seems like it could also be an issue with the C API.

BusyJay added a commit to BusyJay/rust-rocksdb that referenced this issue Aug 18, 2016
BusyJay pushed a commit to BusyJay/rust-rocksdb that referenced this issue Jul 7, 2017
…ated_configurations

Add RocksDB options for in memory configurations.
@iSynaptic iSynaptic added the bug label Nov 29, 2018
@tokahuke
Copy link

What is the status on this bug? I dearly need this for a project of mine. Can I help with anything?

@iSynaptic
Copy link
Member

iSynaptic commented May 21, 2019

@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.

@jrobhoward
Copy link

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:

  • RocksDB wants us to associate the merge operator individually to each column family, and not the entire database.
  • A fix (or workaround) when making use of column families & merge operators would be to use 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants