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

make rocksdb recovery mode configurable #1069

Merged
merged 6 commits into from
Sep 19, 2016

Conversation

zhangjinpeng87
Copy link
Member

make rocksdb recovery mode configurable

# 1 : AbsoluteConsistency, We don't expect to find any corruption in the WAL;
# 2 : PointInTimeRecovery, Recover to point-in-time consistency;
# 3 : SkipAnyCorruptedRecords, Recovery after a disaster;
wal-recovery-mode = 2
Copy link
Member

Choose a reason for hiding this comment

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

Why not use AbsoluteConsistency?

Copy link
Contributor

Choose a reason for hiding this comment

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

The default is 2, I think it is ok.

@@ -187,6 +187,15 @@ fn get_rocksdb_default_cf_option(matches: &Matches, config: &toml::Value) -> Roc
let per_level_compression = util::config::parse_rocksdb_per_level_compression(&cpl).unwrap();
opts.compression_per_level(&per_level_compression);

let rmode = get_integer_value("",
Copy link
Member

Choose a reason for hiding this comment

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

Move this to L148 seems better.

@@ -52,6 +52,16 @@ pub fn parse_rocksdb_per_level_compression(tp: &str)
Ok(result)
}

pub fn parse_rocksdb_wal_recovery_mode(mode: i64) -> Result<DBRecoveryMode, ParseConfigError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

add a test

@siddontang
Copy link
Contributor

CI failed, seem that we should update rocksdb version in travis too. @zhangjinpeng1987

@siddontang
Copy link
Contributor

Rest LGTM

@BusyJay
Copy link
Member

BusyJay commented Sep 18, 2016

Need to merge master.

@siddontang
Copy link
Contributor

PTAL @BusyJay

@BusyJay
Copy link
Member

BusyJay commented Sep 19, 2016

LGTM

@siddontang siddontang merged commit 367b14c into master Sep 19, 2016
@siddontang siddontang deleted the zhangjinpeng/rocksdb-recovery-mode branch September 19, 2016 07:23
iosmanthus pushed a commit to iosmanthus/tikv that referenced this pull request Oct 30, 2023
mittalrishabh pushed a commit to mittalrishabh/tikv that referenced this pull request Nov 22, 2024
* fit get region option

Signed-off-by: Cabinfever_B <[email protected]>

* replace tidb

Signed-off-by: Cabinfever_B <[email protected]>

* replace tidb

Signed-off-by: Cabinfever_B <[email protected]>

---------

Signed-off-by: Cabinfever_B <[email protected]>
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