Revert "No need for Restart Interval for meta blocks"

Summary:
See [issue 3169](https://github.com/facebook/rocksdb/issues/3169) for more information

This reverts commit 593d3de371.
Closes https://github.com/facebook/rocksdb/pull/3188

Differential Revision: D6379271

Pulled By: miasantreble

fbshipit-source-id: 88f9ed67ba52237ad9b6f7251db83672b62d7537
This commit is contained in:
Zhongyi Xie 2017-11-20 16:31:04 -08:00 committed by Andrew Kryczka
parent 5652b6e57f
commit 28d93aea53
2 changed files with 3 additions and 5 deletions

View File

@ -296,7 +296,7 @@ struct BlockBasedTableBuilder::Rep {
file(f),
data_block(table_options.block_restart_interval,
table_options.use_delta_encoding),
range_del_block(port::kMaxInt32),
range_del_block(1), // TODO(andrewkr): restart_interval unnecessary
internal_prefix_transform(_ioptions.prefix_extractor),
compression_type(_compression_type),
compression_opts(_compression_opts),

View File

@ -21,8 +21,7 @@
namespace rocksdb {
MetaIndexBuilder::MetaIndexBuilder()
: meta_index_block_(
new BlockBuilder(port::kMaxInt32 /* restart interval */)) {}
: meta_index_block_(new BlockBuilder(1 /* restart interval */)) {}
void MetaIndexBuilder::Add(const std::string& key,
const BlockHandle& handle) {
@ -39,8 +38,7 @@ Slice MetaIndexBuilder::Finish() {
}
PropertyBlockBuilder::PropertyBlockBuilder()
: properties_block_(
new BlockBuilder(port::kMaxInt32 /* restart interval */)) {}
: properties_block_(new BlockBuilder(1 /* restart interval */)) {}
void PropertyBlockBuilder::Add(const std::string& name,
const std::string& val) {