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

Allow setting RocksDB log directory #959

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Allow setting RocksDB log directory #959

merged 1 commit into from
Nov 24, 2023

Conversation

romanz
Copy link
Owner

@romanz romanz commented Nov 24, 2023

Following #680 (comment).

@romanz romanz merged commit 8775280 into master Nov 24, 2023
8 checks passed
@romanz romanz deleted the db-log-dir branch November 24, 2023 17:49
Copy link
Contributor

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

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

Oh, lol, you already did this. Thanks! :D

name = "db_log_dir"
type = "std::path::PathBuf"
doc = "Directory to store index database internal log (default: same as specified by `db_dir`)"
default = "\"\".into()"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it'd look better if we just made it optional ans only set it if it's Some. I'm surprised setting an empty even does the right thing.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm surprised setting an empty even does the right thing.

I agree, but it seems to work:
https://github.com/facebook/rocksdb/blob/f6fd4b9dbd15dba36f7e5ad23de407b5c26b1460/db/db_impl/db_impl_files.cc#L246

BTW, does configure_me support Optional<PathBuf>?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, simply leave out default = "" and the type in the struct will be wrapped in Option. (For mandatory param you write optional = false.)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks! Please take a look at #960.

romanz added a commit that referenced this pull request Nov 27, 2023
romanz added a commit that referenced this pull request Nov 27, 2023
romanz added a commit that referenced this pull request Nov 28, 2023
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.

2 participants