Definition at line 359 of file fault_injection_test.cc.
§ ExpectedVerifResult
§ ResetMethod
§ FaultInjectionTest()
| leveldb::FaultInjectionTest::FaultInjectionTest |
( |
| ) |
|
|
inline |
Definition at line 370 of file fault_injection_test.cc.
371 :
env_(
new FaultInjectionTestEnv),
Status DestroyDB(const std::string &dbname, const Options &options)
FaultInjectionTestEnv * env_
Cache * NewLRUCache(size_t capacity)
§ ~FaultInjectionTest()
| leveldb::FaultInjectionTest::~FaultInjectionTest |
( |
| ) |
|
|
inline |
Definition at line 383 of file fault_injection_test.cc.
Status DestroyDB(const std::string &dbname, const Options &options)
FaultInjectionTestEnv * env_
§ Build()
| void leveldb::FaultInjectionTest::Build |
( |
int |
start_idx, |
|
|
int |
num_vals |
|
) |
| |
|
inline |
Definition at line 394 of file fault_injection_test.cc.
395 std::string key_space, value_space;
397 for (
int i = start_idx; i < start_idx + num_vals; i++) {
398 Slice key =
Key(i, &key_space);
400 batch.Put(key,
Value(i, &value_space));
401 WriteOptions options;
Slice Value(int k, std::string *storage) const
Slice Key(int i, std::string *storage) const
virtual Status Write(const WriteOptions &options, WriteBatch *updates)=0
§ CloseDB()
| void leveldb::FaultInjectionTest::CloseDB |
( |
| ) |
|
|
inline |
§ DeleteAllData()
| void leveldb::FaultInjectionTest::DeleteAllData |
( |
| ) |
|
|
inline |
Definition at line 462 of file fault_injection_test.cc.
464 WriteOptions options;
465 for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
virtual Status Delete(const WriteOptions &options, const Slice &key)=0
virtual Iterator * NewIterator(const ReadOptions &options)=0
§ DoTest()
| void leveldb::FaultInjectionTest::DoTest |
( |
| ) |
|
|
inline |
Definition at line 512 of file fault_injection_test.cc.
531 num_pre_sync + num_post_sync,
static const size_t kNumIterations
static const int kMaxNumValues
void NoWriteTestReopenWithFault(ResetMethod reset_method)
void PartialCompactTestReopenWithFault(ResetMethod reset_method, int num_pre_sync, int num_post_sync)
void PartialCompactTestPreFault(int num_pre_sync, int num_post_sync)
void NoWriteTestPreFault()
§ Key()
| Slice leveldb::FaultInjectionTest::Key |
( |
int |
i, |
|
|
std::string * |
storage |
|
) |
| const |
|
inline |
Definition at line 437 of file fault_injection_test.cc.
439 snprintf(buf,
sizeof(buf),
"%016d", i);
440 storage->assign(buf, strlen(buf));
441 return Slice(*storage);
§ NoWriteTestPreFault()
| void leveldb::FaultInjectionTest::NoWriteTestPreFault |
( |
| ) |
|
|
inline |
§ NoWriteTestReopenWithFault()
| void leveldb::FaultInjectionTest::NoWriteTestReopenWithFault |
( |
ResetMethod |
reset_method | ) |
|
|
inline |
§ OpenDB()
| Status leveldb::FaultInjectionTest::OpenDB |
( |
| ) |
|
|
inline |
Definition at line 450 of file fault_injection_test.cc.
FaultInjectionTestEnv * env_
static Status Open(const Options &options, const std::string &name, DB **dbptr)
§ PartialCompactTestPreFault()
| void leveldb::FaultInjectionTest::PartialCompactTestPreFault |
( |
int |
num_pre_sync, |
|
|
int |
num_post_sync |
|
) |
| |
|
inline |
Definition at line 485 of file fault_injection_test.cc.
487 Build(0, num_pre_sync);
489 Build(num_pre_sync, num_post_sync);
virtual void CompactRange(const Slice *begin, const Slice *end)=0
void Build(int start_idx, int num_vals)
§ PartialCompactTestReopenWithFault()
| void leveldb::FaultInjectionTest::PartialCompactTestReopenWithFault |
( |
ResetMethod |
reset_method, |
|
|
int |
num_pre_sync, |
|
|
int |
num_post_sync |
|
) |
| |
|
inline |
Definition at line 492 of file fault_injection_test.cc.
FaultInjectionTestEnv * env_
Status Verify(int start_idx, int num_vals, ExpectedVerifResult expected) const
void ResetDBState(ResetMethod reset_method)
void SetFilesystemActive(bool active)
§ ReadValue()
| Status leveldb::FaultInjectionTest::ReadValue |
( |
int |
i, |
|
|
std::string * |
val |
|
) |
| const |
|
inline |
Definition at line 406 of file fault_injection_test.cc.
407 std::string key_space, value_space;
408 Slice key =
Key(i, &key_space);
409 Value(i, &value_space);
411 return db_->
Get(options, key, val);
virtual Status Get(const ReadOptions &options, const Slice &key, std::string *value)=0
Slice Value(int k, std::string *storage) const
Slice Key(int i, std::string *storage) const
§ ResetDBState()
| void leveldb::FaultInjectionTest::ResetDBState |
( |
ResetMethod |
reset_method | ) |
|
|
inline |
Definition at line 472 of file fault_injection_test.cc.
473 switch (reset_method) {
Status DeleteFilesCreatedAfterLastDirSync()
FaultInjectionTestEnv * env_
Status DropUnsyncedFileData()
§ ReuseLogs()
| void leveldb::FaultInjectionTest::ReuseLogs |
( |
bool |
reuse | ) |
|
|
inline |
§ Value()
| Slice leveldb::FaultInjectionTest::Value |
( |
int |
k, |
|
|
std::string * |
storage |
|
) |
| const |
|
inline |
Definition at line 445 of file fault_injection_test.cc.
static const int kValueSize
Slice RandomString(Random *rnd, int len, std::string *dst)
§ Verify()
Definition at line 414 of file fault_injection_test.cc.
417 std::string value_space;
419 for (
int i = start_idx; i < start_idx + num_vals && s.ok(); i++) {
420 Value(i, &value_space);
427 fprintf(stderr,
"Expected an error at %d, but was OK\n", i);
Status ReadValue(int i, std::string *val) const
Slice Value(int k, std::string *storage) const
static Status IOError(const Slice &msg, const Slice &msg2=Slice())
§ db_
| DB* leveldb::FaultInjectionTest::db_ |
§ dbname_
| std::string leveldb::FaultInjectionTest::dbname_ |
§ env_
§ options_
| Options leveldb::FaultInjectionTest::options_ |
§ tiny_cache_
| Cache* leveldb::FaultInjectionTest::tiny_cache_ |
The documentation for this class was generated from the following file: