mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Provide mechanism to configure when to flush the block
Summary: Allow block based table to configure the way flushing the blocks. This feature will allow us to add support for prefix-aligned block. Test Plan: make check Reviewers: dhruba, haobo, sdong, igor Reviewed By: sdong CC: leveldb Differential Revision: https://reviews.facebook.net/D13875
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "rocksdb/comparator.h"
|
||||
#include "rocksdb/env.h"
|
||||
#include "rocksdb/filter_policy.h"
|
||||
#include "rocksdb/flush_block_policy.h"
|
||||
#include "rocksdb/merge_operator.h"
|
||||
#include "table/block_based_table_factory.h"
|
||||
|
||||
@@ -286,12 +287,14 @@ Options::Dump(Logger* log) const
|
||||
collector_names.append(collector->Name());
|
||||
collector_names.append("; ");
|
||||
}
|
||||
Log(log," Options.table_stats_collectors: %s",
|
||||
Log(log, " Options.table_stats_collectors: %s",
|
||||
collector_names.c_str());
|
||||
Log(log," Options.inplace_update_support: %d",
|
||||
Log(log, " Options.inplace_update_support: %d",
|
||||
inplace_update_support);
|
||||
Log(log," Options.inplace_update_num_locks: %zd",
|
||||
Log(log, " Options.inplace_update_num_locks: %zd",
|
||||
inplace_update_num_locks);
|
||||
Log(log, " Options.flush_block_policy_factory: %s",
|
||||
flush_block_policy_factory ? flush_block_policy_factory->Name() : "");
|
||||
} // Options::Dump
|
||||
|
||||
//
|
||||
@@ -331,4 +334,12 @@ Options::PrepareForBulkLoad()
|
||||
return this;
|
||||
}
|
||||
|
||||
Options* Options::SetUpDefaultFlushBlockPolicyFactory() {
|
||||
assert(!flush_block_policy_factory);
|
||||
flush_block_policy_factory =
|
||||
std::make_shared<FlushBlockBySizePolicyFactory>(
|
||||
block_size, block_size_deviation);
|
||||
return this;
|
||||
}
|
||||
|
||||
} // namespace rocksdb
|
||||
|
||||
Reference in New Issue
Block a user