0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

dur compile

This commit is contained in:
Eliot Horowitz 2010-12-13 02:23:50 -05:00
parent 59f8903026
commit 0317b34be5
3 changed files with 11 additions and 4 deletions

View File

@ -489,7 +489,11 @@ namespace mongo {
void unlinkThread();
void recover();
void _debugCheckLastDeclaredWrite() { return getDur().debugCheckLastDeclaredWrite(); }
void _debugCheckLastDeclaredWrite() {
#if defined(_DEBUG)
getDur().debugCheckLastDeclaredWrite();
#endif
}
void DurableImpl::startup() {
if( !cmdLine.dur )
@ -501,9 +505,12 @@ namespace mongo {
boost::thread t(durThread);
boost::thread t2(unlinkThread);
}
} // namespace dur
#endif
} // namespace dur
} // namespace mongo

View File

@ -89,7 +89,7 @@ namespace mongo {
public:
AlignedBuilder _ab; // for direct i/o writes to journal
CommitJob() : _hasWritten(false), _ab(4 * 1024 * 1024) { }
CommitJob() : _ab(4 * 1024 * 1024) , _hasWritten(false) { }
/** record/note an intent to write */
void note(WriteIntent& w);

View File

@ -199,7 +199,7 @@ namespace mongo {
}
if( params.count("dur") ) {
enableDurability();
dur::enableDurability();
cmdLine.dur = true;
}