add disable WAL option

Summary: add disable WAL option

Test Plan: new testcase in db_test.cc

Reviewers: dhruba

Reviewed By: dhruba

Differential Revision: https://reviews.facebook.net/D4011
This commit is contained in:
heyongqiang
2012-07-05 13:39:28 -07:00
parent 7600228072
commit a347d4ac0d
3 changed files with 52 additions and 4 deletions

View File

@@ -244,8 +244,13 @@ struct WriteOptions {
// Default: false
bool sync;
// If true, writes will not first go to the write ahead log,
// and the write may got lost after a crash.
bool disableWAL;
WriteOptions()
: sync(false) {
: sync(false),
disableWAL(false) {
}
};