Move break into block (#7468)

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/7468

Reviewed By: riversand963

Differential Revision: D24028736

Pulled By: ajkr

fbshipit-source-id: bd2b4b8d069491a16373d3d2705fddf7ebfe6723
main
darionyaphet 4 years ago committed by Facebook GitHub Bot
parent e04a50923d
commit 2af46f1011
  1. 15
      table/block_based/index_builder.cc

@ -37,7 +37,8 @@ IndexBuilder* IndexBuilder::CreateIndexBuilder(
comparator, table_opt.index_block_restart_interval, comparator, table_opt.index_block_restart_interval,
table_opt.format_version, use_value_delta_encoding, table_opt.format_version, use_value_delta_encoding,
table_opt.index_shortening, /* include_first_key */ false); table_opt.index_shortening, /* include_first_key */ false);
} break; break;
}
case BlockBasedTableOptions::kHashSearch: { case BlockBasedTableOptions::kHashSearch: {
// Currently kHashSearch is incompatible with index_block_restart_interval // Currently kHashSearch is incompatible with index_block_restart_interval
// > 1 // > 1
@ -46,20 +47,24 @@ IndexBuilder* IndexBuilder::CreateIndexBuilder(
comparator, int_key_slice_transform, comparator, int_key_slice_transform,
table_opt.index_block_restart_interval, table_opt.format_version, table_opt.index_block_restart_interval, table_opt.format_version,
use_value_delta_encoding, table_opt.index_shortening); use_value_delta_encoding, table_opt.index_shortening);
} break; break;
}
case BlockBasedTableOptions::kTwoLevelIndexSearch: { case BlockBasedTableOptions::kTwoLevelIndexSearch: {
result = PartitionedIndexBuilder::CreateIndexBuilder( result = PartitionedIndexBuilder::CreateIndexBuilder(
comparator, use_value_delta_encoding, table_opt); comparator, use_value_delta_encoding, table_opt);
} break; break;
}
case BlockBasedTableOptions::kBinarySearchWithFirstKey: { case BlockBasedTableOptions::kBinarySearchWithFirstKey: {
result = new ShortenedIndexBuilder( result = new ShortenedIndexBuilder(
comparator, table_opt.index_block_restart_interval, comparator, table_opt.index_block_restart_interval,
table_opt.format_version, use_value_delta_encoding, table_opt.format_version, use_value_delta_encoding,
table_opt.index_shortening, /* include_first_key */ true); table_opt.index_shortening, /* include_first_key */ true);
} break; break;
}
default: { default: {
assert(!"Do not recognize the index type "); assert(!"Do not recognize the index type ");
} break; break;
}
} }
return result; return result;
} }

Loading…
Cancel
Save