diff --git a/HISTORY.md b/HISTORY.md index d4e816d01..0352a6322 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,7 +1,8 @@ # Rocksdb Change Log ## 6.13.4 (11/15/2020) ### Bug Fixes -* Fix a bug of encoding and parsing BlockBasedTableOptions::read_amp_bytes_per_bit as a 64-bit integer. +* Fixed a bug of encoding and parsing BlockBasedTableOptions::read_amp_bytes_per_bit as a 64-bit integer. +* Fixed the logic of populating native data structure for `read_amp_bytes_per_bit` during OPTIONS file parsing on big-endian architecture. Without this fix, original code introduced in PR7659, when running on big-endian machine, can mistakenly store read_amp_bytes_per_bit (an uint32) in little endian format. Future access to `read_amp_bytes_per_bit` will give wrong values. Little endian architecture is not affected. ## 6.13.3 (10/14/2020) ### Bug Fixes diff --git a/table/block_based/block_based_table_factory.cc b/table/block_based/block_based_table_factory.cc index 7aeda6896..24aa8c59e 100644 --- a/table/block_based/block_based_table_factory.cc +++ b/table/block_based/block_based_table_factory.cc @@ -345,7 +345,8 @@ static std::unordered_map // generated by affected releases before the fix, we need to // manually parse read_amp_bytes_per_bit with this special hack. uint64_t read_amp_bytes_per_bit = ParseUint64(value); - EncodeFixed32(addr, static_cast(read_amp_bytes_per_bit)); + *(reinterpret_cast(addr)) = + static_cast(read_amp_bytes_per_bit); return Status::OK(); }}}, {"enable_index_compression",