From 28d93aea536b422a3a579af9d5ee349f852bb09f Mon Sep 17 00:00:00 2001 From: Zhongyi Xie Date: Mon, 20 Nov 2017 16:31:04 -0800 Subject: [PATCH] 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 593d3de37171d99a761ce2ab34ffa12654acd055. Closes https://github.com/facebook/rocksdb/pull/3188 Differential Revision: D6379271 Pulled By: miasantreble fbshipit-source-id: 88f9ed67ba52237ad9b6f7251db83672b62d7537 --- table/block_based_table_builder.cc | 2 +- table/meta_blocks.cc | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/table/block_based_table_builder.cc b/table/block_based_table_builder.cc index 9185c607c..4abef8e0d 100644 --- a/table/block_based_table_builder.cc +++ b/table/block_based_table_builder.cc @@ -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), diff --git a/table/meta_blocks.cc b/table/meta_blocks.cc index 3089f463e..19925d788 100644 --- a/table/meta_blocks.cc +++ b/table/meta_blocks.cc @@ -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) {