Permalink
Browse files

disable WAL when async writes are used

  • Loading branch information...
mdcallag committed May 28, 2015
1 parent 5a4de16 commit 2b85fab3dddc6b967f04fe86d8ead2c250320877
Showing with 3 additions and 0 deletions.
  1. +3 −0 wrappers/couch_rocksdb.cc
@@ -105,6 +105,8 @@ couchstore_error_t couchstore_open_db_ex(const char *filename,
ppdb->options->stats_dump_period_sec = 60;
ppdb->options->hard_rate_limit = 3.0;
ppdb->options->soft_rate_limit = 2.5;
+ ppdb->options->level0_slowdown_writes_trigger = 12;
+ ppdb->options->level0_stop_writes_trigger = 16;
if (ppdb->options->compression != rocksdb::kNoCompression) {
ppdb->options->compression_per_level.resize(ppdb->options->num_levels);
@@ -154,6 +156,7 @@ couchstore_error_t couchstore_open_db_ex(const char *filename,
couchstore_error_t couchstore_set_sync(Db *db, int sync)
{
db->write_options->sync = sync ? true : false;
+ db->write_options->disableWAL = sync ? false : true;
return COUCHSTORE_SUCCESS;
}

0 comments on commit 2b85fab

Please sign in to comment.