rocksdb/options
Yanqin Jin 63462c3a94 Hack to load OPTIONS file for read_amp_bytes_per_bit (#7659)
Summary:
A temporary hack to work around a bug in 6.10, 6.11, 6.12, 6.13 and
6.14. The bug will write out 8 bytes to OPTIONS file from the starting
address of BlockBasedTableOptions.read_amp_bytes_per_bit which is
actually a uint32. Consequently, the value of read_amp_bytes_per_bit
written in the OPTIONS file is wrong. From 6.15, RocksDB will
try to parse the read_amp_bytes_per_bit from OPTIONS file as a uint32.
To be able to load OPTIONS file generated by affected releases before
the fix, we need to manually parse read_amp_bytes_per_bit with this hack.

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

Test Plan:
Generate a db with current 6.14.fb (head at b6db05dbb5). Maybe use db_stress.

Checkout this PR, run
```
 ~/rocksdb/ldb --db=. --try_load_options --ignore_unknown_options idump --count_only
```
Expect success, and should not see
```
Failed: Invalid argument: Error parsing read_amp_bytes_per_bit:17179869184
```

Also
make check

Reviewed By: anand1976

Differential Revision: D24954752

Pulled By: riversand963

fbshipit-source-id: c7b802fc3e52acd050a4fc1cd475016122234394
2020-11-15 14:52:54 -08:00
..
cf_options.cc make L0 index/filter pinned memory usage predictable (#6911) 2020-06-09 16:51:23 -07:00
cf_options.h make L0 index/filter pinned memory usage predictable (#6911) 2020-06-09 16:51:23 -07:00
db_options.cc Remove unnecessary inclusion of version_edit.h in env (#6952) 2020-06-07 21:56:55 -07:00
db_options.h Set max_background_flushes dynamically (#6701) 2020-04-20 16:19:02 -07:00
options_helper.cc Add OptionTypeInfo::Vector to parse/serialize vectors (#6424) 2020-06-03 12:23:07 -07:00
options_helper.h Add Struct Type to OptionsTypeInfo (#6425) 2020-05-21 10:58:39 -07:00
options_parser.cc Add Struct Type to OptionsTypeInfo (#6425) 2020-05-21 10:58:39 -07:00
options_parser.h Add Functions to OptionTypeInfo (#6422) 2020-04-28 18:04:26 -07:00
options_settable_test.cc Remove the support of setting CompressionOptions.parallel_threads from string for now (#6782) 2020-04-30 17:01:17 -07:00
options_test.cc Hack to load OPTIONS file for read_amp_bytes_per_bit (#7659) 2020-11-15 14:52:54 -08:00
options_type.h Add OptionTypeInfo::Vector to parse/serialize vectors (#6424) 2020-06-03 12:23:07 -07:00
options.cc Allow MultiGet users to limit cumulative value size (#6826) 2020-05-27 13:07:14 -07:00