0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
This commit is contained in:
dwight 2011-07-09 14:11:42 -04:00
parent 0f3baac667
commit 41224c8fbf

View File

@ -17,7 +17,7 @@
*/
/*
phases
phases:
PREPLOGBUFFER
we will build an output buffer ourself and then use O_DIRECT
@ -36,6 +36,22 @@
there could be a slow down immediately after remapping as fresh copy-on-writes for commonly written pages will
be required. so doing these remaps fractionally is helpful.
mutexes:
READLOCK dbMutex
LOCK groupCommitMutex
PREPLOGBUFFER()
READLOCK mmmutex
commitJob.reset()
UNLOCK dbMutex // now other threads can write
WRITETOJOURNAL()
WRITETODATAFILES()
UNLOCK mmmutex
UNLOCK groupCommitMutex
on the next write lock acquisition for dbMutex: // see MongoMutex::_acquiredWriteLock()
REMAPPRIVATEVIEW()
@see https://docs.google.com/drawings/edit?id=1TklsmZzm7ohIZkwgeK6rMvsdaR13KjtJYMsfLr175Zc
*/
@ -581,7 +597,7 @@ namespace mongo {
// this needs done in a write lock (as there is a short window during remapping when each view
// might not exist) thus we do it on the next acquisition of that instead of here (there is no
// rush if you aren't writing anyway -- but it must happen, if it is done, before any uncommitted
// writes occur). If desired, perhpas this can be eliminated on posix as it may be that the remap
// writes occur). If desired, perhaps this can be eliminated on posix as it may be that the remap
// is race-free there.
//
dbMutex._remapPrivateViewRequested = true;