Exemplo n.º 1
0
    DurableMappedFile::~DurableMappedFile() {
        try { 
            LOG(3) << "mmf close " << filename() << endl;

            // Only notifiy the durability system if the file was actually opened
            if (view_write()) {
                dur::closingFileNotification();
            }

            LockMongoFilesExclusive lk;
            privateViews.remove(_view_private);
            _view_write = _view_private = 0;
            MemoryMappedFile::close();
        }
        catch(...) { error() << "exception in ~DurableMappedFile" << endl; }
    }
Exemplo n.º 2
0
    DurableMappedFile::~DurableMappedFile() {
        try { 
            LOG(3) << "mmf close " << filename();

            // Notify the durability system that we are closing a file.
            getDur().closingFileNotification();

            LockMongoFilesExclusive lk;
            privateViews.remove(_view_private, length());
            _view_write = _view_private = 0;
            MemoryMappedFile::close();
        }
        catch (...) {
            error() << "exception in ~DurableMappedFile";
        }
    }
Exemplo n.º 3
0
DurableMappedFile::~DurableMappedFile() {
    try {
        LOG(3) << "mmf close " << filename();

        // If _view_private was not set, this means file open failed
        if (_view_private) {
            // Notify the durability system that we are closing a file so it can ensure we
            // will not have journaled operations with no corresponding file.
            getDur().closingFileNotification();
        }

        LockMongoFilesExclusive lk;
        privateViews.remove(_view_private, length());

        MemoryMappedFile::close();
    } catch (...) {
        error() << "exception in ~DurableMappedFile";
    }
}