示例#1
0
 void PageFaultException::touch() { 
     if ( Lock::isLocked() ) {
         warning() << "PageFaultException::touch happening with a lock" << endl;
     }
     LockMongoFilesShared lk;
     if( LockMongoFilesShared::getEra() != era ) {
         // files opened and closed.  we don't try to handle but just bail out; this is much simpler
         // and less error prone and saves us from taking a dbmutex readlock.
         MONGO_DLOG(2) << "era changed" << endl;
         return;
     }
     r->touch();
 }
示例#2
0
void NamespaceIndex::kill_ns(const StringData& ns) {
    Lock::assertWriteLocked(ns);
    if ( !_ht )
        return;
    Namespace n(ns);
    _ht->kill(n);

    for( int i = 0; i<=1; i++ ) {
        try {
            Namespace extra(n.extraName(i));
            _ht->kill(extra);
        }
        catch(DBException&) {
            MONGO_DLOG(3) << "caught exception in kill_ns" << endl;
        }
    }
}
示例#3
0
    void NamespaceIndex::kill_ns( OperationContext* txn, const StringData& ns) {
        Lock::assertWriteLocked(ns);
        if ( !_ht.get() )
            return;
        Namespace n(ns);
        _ht->kill(txn, n);

        if (ns.size() <= Namespace::MaxNsColletionLen) {
            // Larger namespace names don't have room for $extras so they can't exist. The code
            // below would cause an "$extra: ns too large" error and stacktrace to be printed to the
            // log even though everything is fine.
            for( int i = 0; i<=1; i++ ) {
                try {
                    Namespace extra(n.extraName(i));
                    _ht->kill(txn, extra);
                }
                catch(DBException&) {
                    MONGO_DLOG(3) << "caught exception in kill_ns" << endl;
                }
            }
        }
    }