void Client::Context::_finishInit() { _db = dbHolder().getOrCreate(_txn, _ns, _justCreated); invariant(_db); if( _doVersion ) checkNotStale(); _client->_curOp->enter( this ); }
void Client::Context::_finishInit() { _db = dbHolder().openDb(_txn, _ns, &_justCreated); invariant(_db); if( _doVersion ) checkNotStale(); _client->_curOp->enter(_ns.c_str(), _db->getProfilingLevel()); }
void Client::Context::_finishInit() { OperationContextImpl txn; // TODO get rid of this once reads require transactions _db = dbHolder().getOrCreate(&txn, _ns, _justCreated); invariant(_db); if( _doVersion ) checkNotStale(); _client->_curOp->enter( this ); }
// invoked from ReadContext Client::Context::Context(const string& ns, Database *db, bool doVersion) : _client( currentClient.get() ), _justCreated(false), _doVersion( doVersion ), _ns( ns ), _db(db) { verify(_db); if (_doVersion) checkNotStale(); _client->_curOp->enter( this ); }
void Client::Context::_finishInit() { dassert( Lock::isLocked() ); int writeLocked = Lock::somethingWriteLocked(); if ( writeLocked && FileAllocator::get()->hasFailed() ) { uassert(14031, "Can't take a write lock while out of disk space", false); } _db = dbHolderUnchecked().getOrCreate( _ns , _path , _justCreated ); verify(_db); if( _doVersion ) checkNotStale(); massert( 16107 , str::stream() << "Don't have a lock on: " << _ns , Lock::atLeastReadLocked( _ns ) ); _client->_context = this; _client->_curOp->enter( this ); }
// invoked from ReadContext Client::Context::Context(const string& path, const string& ns, Database *db) : _client( currentClient.get() ), _oldContext( _client->_context ), _path( path ), _justCreated(false), _doVersion( true ), _ns( ns ), _db(db) { verify(_db); checkNotStale(); _client->_context = this; _client->_curOp->enter( this ); }