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() ); } }
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)); }
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)); }
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)); }
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)); }