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 Create a Customizable class to load classes and configurations (#6590) 2020-11-11 15:10:41 -08:00
configurable_helper.h Create a Customizable class to load classes and configurations (#6590) 2020-11-11 15:10:41 -08:00
configurable_test.cc Create a Customizable class to load classes and configurations (#6590) 2020-11-11 15:10:41 -08:00
configurable_test.h Bring the Configurable options together (#5753) 2020-09-14 17:01:01 -07:00
customizable.cc Create a Customizable class to load classes and configurations (#6590) 2020-11-11 15:10:41 -08:00
customizable_helper.h Create a Customizable class to load classes and configurations (#6590) 2020-11-11 15:10:41 -08:00
customizable_test.cc Create a Customizable class to load classes and configurations (#6590) 2020-11-11 15:10:41 -08:00
db_options.cc Add a host location property to TableProperties (#7479) 2020-10-19 11:38:48 -07:00
db_options.h Add a host location property to TableProperties (#7479) 2020-10-19 11:38:48 -07:00
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 Expand effect of dictionary settings in ColumnFamilyOptions::compression_opts (#7619) 2020-11-02 19:21:11 -08:00
options_parser.cc Return NotFound from TableFactory configuration errors during options loading (#7615) 2020-10-29 18:44:24 -07:00
options_parser.h Bring the Configurable options together (#5753) 2020-09-14 17:01:01 -07:00
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