mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
[Performance Branch] PlainTable to encode rows with seqID 0, value type using 1 internal byte.
Summary: In PlainTable, use one single byte to represent 8 bytes of internal bytes, if seqID = 0 and it is value type (which should be common for bottom most files). It is to save 7 bytes for uncompressed cases. Test Plan: make all check Reviewers: haobo, dhruba, kailiu Reviewed By: haobo CC: igor, leveldb Differential Revision: https://reviews.facebook.net/D15489
This commit is contained in:
@@ -20,15 +20,17 @@ namespace rocksdb {
|
||||
|
||||
Status BlockBasedTableFactory::NewTableReader(
|
||||
const Options& options, const EnvOptions& soptions,
|
||||
const InternalKeyComparator& internal_comparator,
|
||||
unique_ptr<RandomAccessFile>&& file, uint64_t file_size,
|
||||
unique_ptr<TableReader>* table_reader) const {
|
||||
return BlockBasedTable::Open(options, soptions, table_options_,
|
||||
std::move(file), file_size, table_reader);
|
||||
internal_comparator, std::move(file), file_size,
|
||||
table_reader);
|
||||
}
|
||||
|
||||
TableBuilder* BlockBasedTableFactory::NewTableBuilder(
|
||||
const Options& options, WritableFile* file,
|
||||
CompressionType compression_type) const {
|
||||
const Options& options, const InternalKeyComparator& internal_comparator,
|
||||
WritableFile* file, CompressionType compression_type) const {
|
||||
auto flush_block_policy_factory =
|
||||
table_options_.flush_block_policy_factory.get();
|
||||
|
||||
@@ -45,11 +47,9 @@ TableBuilder* BlockBasedTableFactory::NewTableBuilder(
|
||||
options.block_size_deviation);
|
||||
}
|
||||
|
||||
auto table_builder = new BlockBasedTableBuilder(
|
||||
options,
|
||||
file,
|
||||
flush_block_policy_factory,
|
||||
compression_type);
|
||||
auto table_builder =
|
||||
new BlockBasedTableBuilder(options, internal_comparator, file,
|
||||
flush_block_policy_factory, compression_type);
|
||||
|
||||
// Delete flush_block_policy_factory only when it's just created from the
|
||||
// options.
|
||||
|
||||
Reference in New Issue
Block a user