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
main
Zhongyi Xie 7 years ago committed by Facebook Github Bot
parent 30285ee31c
commit a6c6b8b38c
  1. 2
      table/block_based_table_builder.cc
  2. 6
      table/meta_blocks.cc

@ -296,7 +296,7 @@ struct BlockBasedTableBuilder::Rep {
file(f), file(f),
data_block(table_options.block_restart_interval, data_block(table_options.block_restart_interval,
table_options.use_delta_encoding), 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), internal_prefix_transform(_ioptions.prefix_extractor),
compression_type(_compression_type), compression_type(_compression_type),
compression_opts(_compression_opts), compression_opts(_compression_opts),

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

Loading…
Cancel
Save