[RocksDB] cleanup EnvOptions

Summary:
This diff simplifies EnvOptions by treating it as POD, similar to Options.
- virtual functions are removed and member fields are accessed directly.
- StorageOptions is removed.
- Options.allow_readahead and Options.allow_readahead_compactions are deprecated.
- Unused global variables are removed: useOsBuffer, useFsReadAhead, useMmapRead, useMmapWrite

Test Plan: make check; db_stress

Reviewers: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D11175
This commit is contained in:
Haobo Xu
2013-06-07 15:35:17 -07:00
parent 5679107b07
commit bdf1085944
24 changed files with 103 additions and 180 deletions

View File

@@ -14,7 +14,6 @@
#include "leveldb/cache.h"
#include "port/port.h"
#include "table/table.h"
#include "util/storage_options.h"
namespace leveldb {
@@ -23,7 +22,7 @@ class Env;
class TableCache {
public:
TableCache(const std::string& dbname, const Options* options,
const StorageOptions& storage_options, int entries);
const EnvOptions& storage_options, int entries);
~TableCache();
// Return an iterator for the specified file number (the corresponding
@@ -58,7 +57,7 @@ class TableCache {
Env* const env_;
const std::string dbname_;
const Options* options_;
const StorageOptions& storage_options_;
const EnvOptions& storage_options_;
std::shared_ptr<Cache> cache_;
Status FindTable(const EnvOptions& toptions,