mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Ability to configure bufferedio-reads, filesystem-readaheads and mmap-read-write per database.
Summary: This patch allows an application to specify whether to use bufferedio, reads-via-mmaps and writes-via-mmaps per database. Earlier, there was a global static variable that was used to configure this functionality. The default setting remains the same (and is backward compatible): 1. use bufferedio 2. do not use mmaps for reads 3. use mmap for writes 4. use readaheads for reads needed for compaction I also added a parameter to db_bench to be able to explicitly specify whether to do readaheads for compactions or not. Test Plan: make check Reviewers: sheki, heyongqiang, MarkCallaghan Reviewed By: sheki CC: leveldb Differential Revision: https://reviews.facebook.net/D9429
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "leveldb/transaction_log_iterator.h"
|
||||
#include "db/log_file.h"
|
||||
#include "db/log_reader.h"
|
||||
#include "util/storage_options.h"
|
||||
|
||||
namespace leveldb {
|
||||
|
||||
@@ -27,6 +28,7 @@ class TransactionLogIteratorImpl : public TransactionLogIterator {
|
||||
public:
|
||||
TransactionLogIteratorImpl(const std::string& dbname,
|
||||
const Options* options,
|
||||
const StorageOptions& soptions,
|
||||
SequenceNumber& seqNum,
|
||||
std::vector<LogFile>* files,
|
||||
SequenceNumber const * const lastFlushedSequence);
|
||||
@@ -47,6 +49,7 @@ class TransactionLogIteratorImpl : public TransactionLogIterator {
|
||||
private:
|
||||
const std::string& dbname_;
|
||||
const Options* options_;
|
||||
const StorageOptions& soptions_;
|
||||
const uint64_t sequenceNumber_;
|
||||
const std::vector<LogFile>* files_;
|
||||
bool started_;
|
||||
|
||||
Reference in New Issue
Block a user