void Journal::cleanup() { if( !okToCleanUp ) return; try { scoped_lock lk(_curLogFileMutex); closeCurrentJournalFile(); removeJournalFiles(); } catch(std::exception& e) { log() << "error couldn't remove journal file during shutdown " << e.what() << endl; throw; } }
void journalCleanup() { if( testIntent ) return; if( !okToCleanUp ) return; if( !j.tryToCloseCurJournalFile() ) { return; } try { removeJournalFiles(); } catch(std::exception& e) { log() << "error couldn't remove journal file during shutdown " << e.what() << endl; } }