Ejemplo n.º 1
0
 static void namespaceGetNamespacesCallback( const Namespace& k , NamespaceDetails& v , list<string>* l ) {
     if ( ! k.hasDollarSign() || k == "local.oplog.$main" ) {
         // we call out local.oplog.$main specifically as its the only "normal"
         // collection that has a $, so we make sure it gets added
         l->push_back( k.toString() );
     }
 }
Ejemplo n.º 2
0
 void NamespaceIndex::add_ns( const Namespace& ns, const NamespaceDetails* details ) {
     string nsString = ns.toString();
     Lock::assertWriteLocked( nsString );
     massert( 17315, "no . in ns", nsString.find( '.' ) != string::npos );
     init();
     uassert( 10081, "too many namespaces/collections", _ht->put(ns, *details));
 }
Ejemplo n.º 3
0
 void NamespaceIndex::add_ns( OperationContext* txn,
                              const Namespace& ns, const NamespaceDetails* details ) {
     string nsString = ns.toString();
     txn->lockState()->assertWriteLocked( nsString );
     massert( 17315, "no . in ns", nsString.find( '.' ) != string::npos );
     init( txn );
     uassert( 10081, "too many namespaces/collections", _ht->put(txn, ns, *details));
 }
Ejemplo n.º 4
0
void NamespaceIndex::add_ns(OperationContext* txn,
                            const Namespace& ns,
                            const NamespaceDetails* details) {
    const NamespaceString nss(ns.toString());
    invariant(txn->lockState()->isDbLockedForMode(nss.db(), MODE_X));

    massert(17315, "no . in ns", nsIsFull(nss.toString()));

    uassert(10081, "too many namespaces/collections", _ht->put(txn, ns, *details));
}
Ejemplo n.º 5
0
void NamespaceIndex::add_ns( const Namespace& ns, const NamespaceDetails* details ) {
    Lock::assertWriteLocked(ns.toString());
    init();
    uassert( 10081 , "too many namespaces/collections", _ht->put(ns, *details));
}