Example #1
0
        /** at startup, recover, and then start the journal threads */
        void startup() {
            if (!storageGlobalParams.dur)
                return;

            journalMakeDir();

            try {
                replayJournalFilesAtStartup();
            }
            catch(DBException& e) {
                log() << "dbexception during recovery: " << e.toString() << endl;
                throw;
            }
            catch(std::exception& e) {
                log() << "std::exception during recovery: " << e.what() << endl;
                throw;
            }
            catch(...) {
                log() << "exception during recovery" << endl;
                throw;
            }

            preallocateFiles();

            DurableInterface::enableDurability();
            boost::thread t(durThread);
        }
Example #2
0
/**
 * Invoked at server startup. Recovers the database by replaying journal files and then
 * starts the durability thread.
 */
void startup(ClockSource* cs, int64_t serverStartMs) {
    if (!storageGlobalParams.dur) {
        return;
    }

    journalMakeDir(cs, serverStartMs);

    try {
        replayJournalFilesAtStartup();
    } catch (DBException& e) {
        severe() << "dbexception during recovery: " << e.toString();
        throw;
    } catch (std::exception& e) {
        severe() << "std::exception during recovery: " << e.what();
        throw;
    } catch (...) {
        severe() << "exception during recovery";
        throw;
    }

    preallocateFiles();

    durableImpl.start(cs, serverStartMs);
    DurableInterface::_impl = &durableImpl;
}
Example #3
0
 void DurableImpl::startup() {
     if( !cmdLine.dur )
         return;
     if( testIntent )
         return;
     recover();
     journalMakeDir();
     boost::thread t(durThread);
     boost::thread t2(unlinkThread);
 }
Example #4
0
File: dur.cpp Project: rakex/mongo
 void startup() {
     journalMakeDir();
     boost::thread t(durThread);
 }