diff options
author | Eliot Horowitz <eliot@10gen.com> | 2013-06-18 09:58:59 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2013-06-18 09:58:59 -0400 |
commit | 7471abc180fbd5f7b2ac31c51a71563052ea03ce (patch) | |
tree | 01b571c7e107bbdf50480ee648986d1d54386a16 /src/mongo/db/introspect.cpp | |
parent | f2e40f7814d0f664d1baa202d623a0e3d678245b (diff) | |
download | mongo-7471abc180fbd5f7b2ac31c51a71563052ea03ce.tar.gz |
SERVER-6405: trivial prep cleanup of Database class
Diffstat (limited to 'src/mongo/db/introspect.cpp')
-rw-r--r-- | src/mongo/db/introspect.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp index 78eccac7406..139821afd3f 100644 --- a/src/mongo/db/introspect.cpp +++ b/src/mongo/db/introspect.cpp @@ -68,7 +68,7 @@ namespace { static void _profile(const Client& c, CurOp& currentOp, BufBuilder& profileBufBuilder) { Database *db = c.database(); DEV verify( db ); - const char *ns = db->profileName.c_str(); + const char *ns = db->getProfilingNS(); // build object BSONObjBuilder b(profileBufBuilder); @@ -140,21 +140,21 @@ namespace { NamespaceDetails* getOrCreateProfileCollection(Database *db, bool force, string* errmsg ) { fassert(16372, db); - const char* profileName = db->profileName.c_str(); - NamespaceDetails* details = db->namespaceIndex.details(profileName); + const char* profileName = db->getProfilingNS(); + NamespaceDetails* details = db->namespaceIndex().details(profileName); if (!details && (cmdLine.defaultProfile || force)) { // system.profile namespace doesn't exist; create it log() << "creating profile collection: " << profileName << endl; string myerrmsg; - if (!userCreateNS(db->profileName.c_str(), + if (!userCreateNS(profileName, BSON("capped" << true << "size" << 1024 * 1024), myerrmsg , false)) { - myerrmsg = str::stream() << "could not create ns " << db->profileName << ": " << myerrmsg; + myerrmsg = str::stream() << "could not create ns " << profileName << ": " << myerrmsg; log() << myerrmsg << endl; if ( errmsg ) *errmsg = myerrmsg; return NULL; } - details = db->namespaceIndex.details(profileName); + details = db->namespaceIndex().details(profileName); } else if ( details && !details->isCapped() ) { string myerrmsg = str::stream() << profileName << " exists but isn't capped"; |