rocksdb/options
Yanqin Jin 9aa1b1dc19 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-13 11:52:50 -08:00
..
cf_options.cc Add options for integrated blob GC (#7661) 2020-11-12 18:58:44 -08:00
cf_options.h Add options for integrated blob GC (#7661) 2020-11-12 18:58:44 -08:00
configurable.cc
configurable_helper.h
configurable_test.cc
configurable_test.h
customizable.cc
customizable_helper.h
customizable_test.cc
db_options.cc
db_options.h
options.cc Add options for integrated blob GC (#7661) 2020-11-12 18:58:44 -08:00
options_helper.cc Update option "allow_data_in_errors" in BuildOptions (#7665) 2020-11-12 22:09:17 -08:00
options_helper.h
options_parser.cc
options_parser.h
options_settable_test.cc Update option "allow_data_in_errors" in BuildOptions (#7665) 2020-11-12 22:09:17 -08:00
options_test.cc Hack to load OPTIONS file for read_amp_bytes_per_bit (#7659) 2020-11-13 11:52:50 -08:00