summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2018-03-21 11:37:40 -0400
committerLouis Williams <louis.williams@mongodb.com>2018-03-21 13:19:54 -0400
commit9799d8b7223205635ccb428bbec1ba4d947ba13b (patch)
treee11df2a05cfcbd09bbf8f236b619b988495e01ca /src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
parent0d409c4d63afb585b329187ff904be9068df9466 (diff)
downloadmongo-9799d8b7223205635ccb428bbec1ba4d947ba13b.tar.gz
SERVER-33306 SERVER-33307 SERVER-33308 Add prepareTransaction command stub. Add prepare method to
WriteUnitOfWork. Implement prepareUnitOfWork in WiredTigerRecoveryUnit.
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
index 31aa457f507..f20977f29ca 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
@@ -38,6 +38,7 @@
#include "mongo/base/simple_string_data_comparator.h"
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/concurrency/write_conflict_exception.h"
+#include "mongo/db/server_parameters.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_session_cache.h"
#include "mongo/util/assert_util.h"
@@ -50,6 +51,19 @@ namespace mongo {
using std::string;
+bool kDisableJournalForReplicatedCollections{false};
+
+// For testing purposes only. Disables journaling (write-ahead logging) for replicated collections.
+class DisableJournalForReplicatedCollections
+ : public ExportedServerParameter<bool, ServerParameterType::kStartupOnly> {
+public:
+ DisableJournalForReplicatedCollections()
+ : ExportedServerParameter<bool, ServerParameterType::kStartupOnly>(
+ ServerParameterSet::getGlobal(),
+ "disableJournalForReplicatedCollections",
+ &kDisableJournalForReplicatedCollections) {}
+} DisableJournalSetting;
+
Status wtRCToStatus_slow(int retCode, const char* prefix) {
if (retCode == 0)
return Status::OK();