diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-07-09 10:03:15 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-07-09 10:03:15 +1000 |
commit | 30af679e6020e0354e73133e3005fd1e6682e220 (patch) | |
tree | c255f8bf77bdc66844a336980c2aa3f3a5cd13ba /api | |
parent | 34c45cb6a3e4e161f1610c6ac604db2e0944412d (diff) | |
download | mongo-30af679e6020e0354e73133e3005fd1e6682e220.tar.gz |
The RocksDB Flush operation should only apply to a single table. Fix it, and turn on periodic checkpoints by default so that log files can still be archived.
Diffstat (limited to 'api')
-rw-r--r-- | api/leveldb/leveldb_wt.h | 2 | ||||
-rw-r--r-- | api/leveldb/rocks_wt.cc | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/api/leveldb/leveldb_wt.h b/api/leveldb/leveldb_wt.h index 54a98a8cb9c..07036d51b7a 100644 --- a/api/leveldb/leveldb_wt.h +++ b/api/leveldb/leveldb_wt.h @@ -45,7 +45,7 @@ #include "wiredtiger.h" #define WT_URI "table:data" -#define WT_CONN_CONFIG "log=(enabled),checkpoint_sync=false," \ +#define WT_CONN_CONFIG "log=(enabled),checkpoint=(wait=180),checkpoint_sync=false," \ "session_max=8192,mmap=false,eviction_workers=4," \ "transaction_sync=(enabled=true,method=none)," // Note: LSM doesn't split, build full pages from the start diff --git a/api/leveldb/rocks_wt.cc b/api/leveldb/rocks_wt.cc index abfab10cf09..a70acbdf1f6 100644 --- a/api/leveldb/rocks_wt.cc +++ b/api/leveldb/rocks_wt.cc @@ -231,10 +231,12 @@ DbImpl::Delete(WriteOptions const &write_options, ColumnFamilyHandle *cfhp, Slic } Status -DbImpl::Flush(FlushOptions const&, ColumnFamilyHandle*) +DbImpl::Flush(FlushOptions const&, ColumnFamilyHandle* cfhp) { + ColumnFamilyHandleImpl *cf = + static_cast<ColumnFamilyHandleImpl *>(cfhp); WT_SESSION *session = GetContext()->GetSession(); - return WiredTigerErrorToStatus(session->checkpoint(session, NULL)); + return WiredTigerErrorToStatus(session->checkpoint(session, ("targets=(" + cf->GetURI() + ")").c_str())); } Status |