ldb to allow db with --try_load_options and without an options file
Summary: This is to fix tools/check_format_compatible.sh. The tool try to open old versions of rocksdb with the provided options file. When options file is missing (e.g. rocksdb 2.2), it should still proceed with default options. Closes https://github.com/facebook/rocksdb/pull/3232 Differential Revision: D6503955 Pulled By: yiwu-arbug fbshipit-source-id: e44cfcce7ddc7d12cf83466ed3f3fe7624aa78b8
This commit is contained in:
parent
b5798bd324
commit
7f04af32a5
@ -315,7 +315,7 @@ void LDBCommand::OpenDB() {
|
||||
if (!create_if_missing_ && try_load_options_) {
|
||||
Status s = LoadLatestOptions(db_path_, Env::Default(), &options_,
|
||||
&column_families_, ignore_unknown_options_);
|
||||
if (!s.ok()) {
|
||||
if (!s.ok() && !s.IsNotFound()) {
|
||||
// Option file exists but load option file error.
|
||||
std::string msg = s.ToString();
|
||||
exec_state_ = LDBCommandExecuteResult::Failed(msg);
|
||||
|
Loading…
Reference in New Issue
Block a user