From 1ca86f0391bd4e2d262afef0314a241940d445a8 Mon Sep 17 00:00:00 2001 From: Kai Liu Date: Mon, 28 Oct 2013 10:51:34 -0700 Subject: [PATCH] Fix a bug that index block's restart_block_interval is not 1 Summary: This bug may affect the seek performance. Test Plan: make make check Also gdb into some index block builder to make sure the restart_block_interval is `1`. --- table/table_builder.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/table/table_builder.cc b/table/table_builder.cc index 7665ef793..8569b9402 100644 --- a/table/table_builder.cc +++ b/table/table_builder.cc @@ -99,12 +99,11 @@ struct TableBuilder::Rep { index_block_options(opt), file(f), data_block(&options), - index_block(&index_block_options), + index_block(1, index_block_options.comparator), enable_compression(enable_compression), filter_block(opt.filter_policy == nullptr ? nullptr : new FilterBlockBuilder(opt)), pending_index_entry(false) { - index_block_options.block_restart_interval = 1; } };