summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-07-09 10:03:15 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-07-09 10:03:15 +1000
commit30af679e6020e0354e73133e3005fd1e6682e220 (patch)
treec255f8bf77bdc66844a336980c2aa3f3a5cd13ba /api
parent34c45cb6a3e4e161f1610c6ac604db2e0944412d (diff)
downloadmongo-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.h2
-rw-r--r--api/leveldb/rocks_wt.cc6
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