Update option "allow_data_in_errors" in BuildOptions (#7665)

Summary:
"allow_data_in_errors" is not updated in BuildOptions. So it
would assume default value when BuildOptions is called.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7665

Test Plan: make check -j64

Reviewed By: zhichao-cao

Differential Revision: D24929100

Pulled By: akankshamahajan15

fbshipit-source-id: dd6225a6c9f13b20027ff1b6de8e79801b57b3f7
main
Akanksha Mahajan 4 years ago committed by Facebook GitHub Bot
parent 60af964372
commit e300ce211d
  1. 1
      options/options_helper.cc
  2. 3
      options/options_settable_test.cc

@ -167,6 +167,7 @@ DBOptions BuildDBOptions(const ImmutableDBOptions& immutable_db_options,
options.bgerror_resume_retry_interval =
immutable_db_options.bgerror_resume_retry_interval;
options.db_host_id = immutable_db_options.db_host_id;
options.allow_data_in_errors = immutable_db_options.allow_data_in_errors;
return options;
}

@ -334,7 +334,8 @@ TEST_F(OptionsSettableTest, DBOptionsAllFieldsSettable) {
"best_efforts_recovery=false;"
"max_bgerror_resume_count=2;"
"bgerror_resume_retry_interval=1000000"
"db_host_id=hostname",
"db_host_id=hostname;"
"allow_data_in_errors=false",
new_options));
ASSERT_EQ(unset_bytes_base, NumUnsetBytes(new_options_ptr, sizeof(DBOptions),

Loading…
Cancel
Save