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

support rocksdb info log dir #1700

Merged
merged 6 commits into from
Apr 2, 2017
Merged

support rocksdb info log dir #1700

merged 6 commits into from
Apr 2, 2017

Conversation

siddontang
Copy link
Contributor

We can use info-log-dir to let RocksDB save its log to other place, not in origin data storage path.
But we should know that the log name is still LOG.

@andelf @BusyJay @zhangjinpeng1987

@@ -325,6 +325,13 @@ fn get_rocksdb_db_option(config: &toml::Value) -> RocksdbOptions {
get_toml_int(config, "rocksdb.compaction-readahead-size", Some(0));
opts.set_compaction_readahead_size(compaction_readahead_size as u64);

let info_log_dir = get_toml_string(config, "rocksdb.info-log-dir", Some("".to_owned()));
if !info_log_dir.is_empty() {
opts.create_info_log(&info_log_dir).unwrap_or_else(|e| {
Copy link
Member

Choose a reason for hiding this comment

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

It is better to set log_file_time_to_roll or max_log_file_size rotate the LOG.

@siddontang
Copy link
Contributor Author

PTAL @zhangjinpeng1987

Copy link
Member

@zhangjinpeng87 zhangjinpeng87 left a comment

Choose a reason for hiding this comment

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

LGTM

@siddontang
Copy link
Contributor Author

PTAL @BusyJay @andelf

# RocksDB info log directory, if set, RocksDB will save the log in `info-log-dir/LOG`.
# info-log-dir = ""
# Maximal size of the info log, if new info log will be created if size is large than it.
# info-log-max-size = 0
Copy link
Member

Choose a reason for hiding this comment

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

Can this be set even when info-log-dir is empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@siddontang
Copy link
Contributor Author

PTAL @BusyJay

Copy link
Member

@BusyJay BusyJay left a comment

Choose a reason for hiding this comment

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

LGTM

@siddontang siddontang merged commit a4c8dfc into master Apr 2, 2017
@siddontang siddontang deleted the siddontang/info-log branch April 2, 2017 03:08
iosmanthus pushed a commit to iosmanthus/tikv that referenced this pull request Oct 17, 2024
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.

3 participants