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

optionally read rocksdb configfile #20

Merged
merged 4 commits into from Jul 9, 2018
Merged

optionally read rocksdb configfile #20

merged 4 commits into from Jul 9, 2018

Conversation

fm3
Copy link
Member

@fm3 fm3 commented May 17, 2018

new command line option -r <filepath> causes a rocksdb options file to be read.

The two options create_if_missing and create_missing_column_families from the file are ignored and are always set to true.

We still use (and create) the column families specified by the command line parameter -c (rather than constructing them from the config file. We will change that in a future PR)

A sample rocks-config.ini looks like this

[Version]
  rocksdb_version=5.11.3
  options_file_version=1.1

[DBOptions]
  stats_dump_period_sec=700

[CFOptions "default"]

fixes #18

@fm3 fm3 self-assigned this May 17, 2018
@fm3 fm3 requested review from normanrz and jstriebel May 17, 2018 11:58
@scalableminds scalableminds deleted a comment from fm3 May 17, 2018
Copy link
Contributor

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But it would be great if we could test this, not sure if that's maybe to complicated, though.

@normanrz
Copy link
Member

What is the reason for keeping -c?

@fm3
Copy link
Member Author

fm3 commented May 17, 2018

@normanrz I did not want to change the default behavior in this PR, for it was created to support global options. Dropping -c would make the config file a hard requirement. We can do that if you think it would be a real benefit, but I would defer it to a separate PR

@normanrz
Copy link
Member

@fm3 Ok. Let's defer. But I think it would be great to drop the custom -c parameter and rely on the standard RocksDB options (not only for global options, but also for column families including their options)

@fm3
Copy link
Member Author

fm3 commented May 17, 2018

@jstriebel I added some tests

Copy link
Contributor

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fm3 fm3 merged commit 8c50a96 into master Jul 9, 2018
@fm3 fm3 deleted the rocksdb-configfile branch July 9, 2018 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure database through RocksDB options file
3 participants