summaryrefslogtreecommitdiff
path: root/db/log_reader.h
diff options
context:
space:
mode:
authorsdong <siying.d@fb.com>2015-07-17 16:16:11 -0700
committersdong <siying.d@fb.com>2015-07-17 16:58:18 -0700
commit6e9fbeb27c38329f33ae541302c44c8db8374f8c (patch)
treee8d7ceea62ee759a6fe7b43b6337490ba3efb72a /db/log_reader.h
parent5ec829bc4f490d22681090b3240666b83688c3ec (diff)
Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env
Summary: We want to keep Env a think layer for better portability. Less platform dependent codes should be moved out of Env. In this patch, I create a wrapper of file readers and writers, and put rate limiting, write buffering, as well as most perf context instrumentation and random kill out of Env. It will make it easier to maintain multiple Env in the future. Test Plan: Run all existing unit tests. Reviewers: anthony, kradhakrishnan, IslamAbdelRahman, yhchiang, igor Reviewed By: igor Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D42321
Diffstat (limited to 'db/log_reader.h')
-rw-r--r--db/log_reader.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/db/log_reader.h b/db/log_reader.h
index e6cbf47ac..390696b85 100644
--- a/db/log_reader.h
+++ b/db/log_reader.h
@@ -17,7 +17,7 @@
namespace rocksdb {
-class SequentialFile;
+class SequentialFileReader;
using std::unique_ptr;
namespace log {
@@ -51,7 +51,7 @@ class Reader {
//
// The Reader will start reading at the first record located at physical
// position >= initial_offset within the file.
- Reader(unique_ptr<SequentialFile>&& file, Reporter* reporter,
+ Reader(unique_ptr<SequentialFileReader>&& file, Reporter* reporter,
bool checksum, uint64_t initial_offset);
~Reader();
@@ -81,10 +81,10 @@ class Reader {
// block that was partially read.
void UnmarkEOF();
- SequentialFile* file() { return file_.get(); }
+ SequentialFileReader* file() { return file_.get(); }
private:
- const unique_ptr<SequentialFile> file_;
+ const unique_ptr<SequentialFileReader> file_;
Reporter* const reporter_;
bool const checksum_;
char* const backing_store_;