summaryrefslogtreecommitdiff
path: root/src/mongo/db/dur_recover.cpp
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2012-02-13 10:36:35 -0500
committerdwight <dwight@10gen.com>2012-02-13 10:36:35 -0500
commit0d27f0162445dd166fe34f4e1e107cfec9150275 (patch)
treee41586f1028c8d093c5d66c6d1fa4ceb09d78806 /src/mongo/db/dur_recover.cpp
parent0f633180a55e01b947c71f6089b9b37616b30b02 (diff)
downloadmongo-0d27f0162445dd166fe34f4e1e107cfec9150275.tar.gz
SERVER-4328 make note DurOp multi writer threadsafe; while we are at it we get rid of a global var by merging it into commitjob which is another global so one less
Diffstat (limited to 'src/mongo/db/dur_recover.cpp')
-rw-r--r--src/mongo/db/dur_recover.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mongo/db/dur_recover.cpp b/src/mongo/db/dur_recover.cpp
index 62e50ef292a..1eb4b2fbff4 100644
--- a/src/mongo/db/dur_recover.cpp
+++ b/src/mongo/db/dur_recover.cpp
@@ -37,14 +37,13 @@
#include "curop.h"
#include "mongommf.h"
#include "../util/compress.h"
-
#include <sys/stat.h>
#include <fcntl.h>
+#include "dur_commitjob.h"
+#include <boost/filesystem/operations.hpp>
using namespace mongoutils;
-#include <boost/filesystem/operations.hpp>
-
namespace mongo {
namespace dur {
@@ -504,8 +503,6 @@ namespace mongo {
RecoveryJob::get().go(journalFiles);
}
- extern mutex groupCommitMutex;
-
/** recover from a crash
called during startup
throws on error
@@ -517,7 +514,7 @@ namespace mongo {
// this is so the mutexdebugger doesn't get confused. we are actually single threaded
// at this point in the program so it wouldn't have been a true problem (I think)
- scoped_lock lk2(groupCommitMutex);
+ SimpleMutex::scoped_lock lk2(commitJob.groupCommitMutex);
_recover(); // throws on interruption
}