rocksdb/options
Andrew Kryczka 019d7894eb fix calling SetOptions on deprecated options
Summary:
In `cf_options_type_info`, the deprecated options are all considered to have offset zero in the `MutableCFOptions` struct. Previously we weren't checking in `GetMutableOptionsFromStrings` whether the provided option was deprecated or not and simply writing the provided value to the offset specified by `cf_options_type_info`. That meant setting any deprecated option would overwrite the first element in the struct, which is `write_buffer_size`. `db_stress` hit this often since it calls `SetOptions` with `soft_rate_limit=0` and `hard_rate_limit=0`, which are both deprecated so cause `write_buffer_size` to be set to zero, which causes it to crash on the following assertion:

```
db_stress: db/memtable.cc:106: rocksdb::MemTable::MemTable(const rocksdb::InternalKeyComparator&, const rocksdb::ImmutableCFOptions&, const rocksdb::MutableCFOptions&, rocksdb::WriteBufferManager*, rocksdb::SequenceNumber, uint32_t): Assertion `!ShouldScheduleFlush()' failed.
```

We fix it by skipping deprecated options (and logging a warning) when users provide them to `SetOptions`. I didn't want to fail the call for compatibility reasons.
Closes https://github.com/facebook/rocksdb/pull/3700

Differential Revision: D7572596

Pulled By: ajkr

fbshipit-source-id: bd5d84e14c0c39f30c5d4c6df7c1503d2c28ecf1
2018-04-10 19:02:09 -07:00
..
cf_options.cc Support for Column family specific paths. 2018-04-05 19:58:20 -07:00
cf_options.h fix some text in comments. 2018-04-10 15:59:24 -07:00
db_options.cc Make DBOption compaction_readahead_size dynamic 2017-11-16 17:57:25 -08:00
db_options.h Make DBOption compaction_readahead_size dynamic 2017-11-16 17:57:25 -08:00
options_helper.cc fix calling SetOptions on deprecated options 2018-04-10 19:02:09 -07:00
options_helper.h fix calling SetOptions on deprecated options 2018-04-10 19:02:09 -07:00
options_parser.cc Comment out unused variables 2018-03-05 13:13:41 -08:00
options_parser.h WritePrepared Txn: Optimize for recoverable state 2017-11-01 17:26:46 -07:00
options_sanity_check.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
options_sanity_check.h Change RocksDB License 2017-07-15 16:11:23 -07:00
options_settable_test.cc Support for Column family specific paths. 2018-04-05 19:58:20 -07:00
options_test.cc RocksDBOptionsParser::Parse()'s ignore_unknown_options argument only ingores options from higher version. 2018-02-22 13:28:12 -08:00
options.cc Level Compaction with TTL 2018-04-02 22:14:28 -07:00