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

clarify confusing log line

This commit is contained in:
dwight 2011-03-01 21:20:34 -05:00
parent df7248a721
commit 0fe9db187a
4 changed files with 11 additions and 7 deletions

View File

@ -190,10 +190,12 @@ namespace mongo {
/** at clean shutdown */
bool okToCleanUp = false; // successful recovery would set this to true
void Journal::cleanup() {
void Journal::cleanup(bool _log) {
if( !okToCleanUp )
return;
if( _log )
log() << "journalCleanup..." << endl;
try {
scoped_lock lk(_curLogFileMutex);
closeCurrentJournalFile();
@ -204,7 +206,7 @@ namespace mongo {
throw;
}
}
void journalCleanup() { j.cleanup(); }
void journalCleanup(bool log) { j.cleanup(log); }
bool _preallocateIsFaster() {
bool faster = false;

View File

@ -27,8 +27,11 @@ namespace mongo {
*/
extern bool okToCleanUp;
/** at termination after db files closed & fsynced */
void journalCleanup();
/** at termination after db files closed & fsynced
also after covery
@param log report in log that we are cleaning up if we actually do any work
*/
void journalCleanup(bool log = false);
/** assure journal/ dir exists. throws */
void journalMakeDir();

View File

@ -47,7 +47,7 @@ namespace mongo {
boost::filesystem::path getFilePathFor(int filenumber) const;
unsigned long long lastFlushTime() const { return _lastFlushTime; }
void cleanup();
void cleanup(bool log);
// Rotate after reaching this data size in a journal (j._<n>) file
// We use a smaller size for 32 bit as the journal is mmapped during recovery (only)

View File

@ -763,8 +763,7 @@ namespace mongo {
rawOut( ss3.str() );
if( cmdLine.dur ) {
log() << "shutdown: journalCleanup..." << endl;
dur::journalCleanup();
dur::journalCleanup(true);
}
#if !defined(__sunos__)