diff options
author | dwight <dwight@dmmb.local> | 2009-12-29 13:42:45 -0500 |
---|---|---|
committer | dwight <dwight@dmmb.local> | 2009-12-29 13:42:45 -0500 |
commit | 24e2542d9525102369d8cf78bd165b2cc2629670 (patch) | |
tree | 863c7cf52e4575e953d4e4ecb9bc2b5778a04654 | |
parent | bffb7fd6e18c7f8ac34676600eedbbe8fa791777 (diff) | |
download | mongo-24e2542d9525102369d8cf78bd165b2cc2629670.tar.gz |
remove dbinfo.h/cpp
-rw-r--r-- | SConstruct | 2 | ||||
-rw-r--r-- | client/clientOnly.cpp | 1 | ||||
-rw-r--r-- | db/db.h | 2 | ||||
-rw-r--r-- | db/dbhelpers.h | 1 | ||||
-rw-r--r-- | db/dbinfo.cpp | 36 | ||||
-rw-r--r-- | db/dbinfo.h | 59 | ||||
-rw-r--r-- | db/instance.cpp | 3 | ||||
-rw-r--r-- | db/namespace.cpp | 3 | ||||
-rw-r--r-- | s/s_only.cpp | 1 | ||||
-rw-r--r-- | scripting/engine.cpp | 1 |
10 files changed, 6 insertions, 103 deletions
diff --git a/SConstruct b/SConstruct index d90a38191c5..6b4d8aee658 100644 --- a/SConstruct +++ b/SConstruct @@ -330,7 +330,7 @@ else: coreDbFiles = [] coreServerFiles = [ "util/message_server_port.cpp" , "util/message_server_asio.cpp" ] -serverOnlyFiles = Split( "db/query.cpp db/update.cpp db/introspect.cpp db/btree.cpp db/clientcursor.cpp db/tests.cpp db/repl.cpp db/btreecursor.cpp db/cloner.cpp db/namespace.cpp db/matcher.cpp db/dbeval.cpp db/dbwebserver.cpp db/dbinfo.cpp db/dbhelpers.cpp db/instance.cpp db/pdfile.cpp db/cursor.cpp db/security_commands.cpp db/client.cpp db/security.cpp util/miniwebserver.cpp db/storage.cpp db/reccache.cpp db/queryoptimizer.cpp db/extsort.cpp db/mr.cpp s/d_util.cpp" ) +serverOnlyFiles = Split( "db/query.cpp db/update.cpp db/introspect.cpp db/btree.cpp db/clientcursor.cpp db/tests.cpp db/repl.cpp db/btreecursor.cpp db/cloner.cpp db/namespace.cpp db/matcher.cpp db/dbeval.cpp db/dbwebserver.cpp db/dbhelpers.cpp db/instance.cpp db/pdfile.cpp db/cursor.cpp db/security_commands.cpp db/client.cpp db/security.cpp util/miniwebserver.cpp db/storage.cpp db/reccache.cpp db/queryoptimizer.cpp db/extsort.cpp db/mr.cpp s/d_util.cpp" ) serverOnlyFiles += Glob( "db/dbcommands*.cpp" ) if usesm: diff --git a/client/clientOnly.cpp b/client/clientOnly.cpp index b315afd2e74..85fbecc8039 100644 --- a/client/clientOnly.cpp +++ b/client/clientOnly.cpp @@ -17,7 +17,6 @@ #include "stdafx.h" #include "../client/dbclient.h" -#include "../db/dbinfo.h" #include "../db/dbhelpers.h" #include "../db/cmdline.h" @@ -181,5 +181,5 @@ namespace mongo { } // namespace mongo -#include "dbinfo.h" +//#include "dbinfo.h" #include "concurrency.h" diff --git a/db/dbhelpers.h b/db/dbhelpers.h index 9c03dfeab58..eba77581b5e 100644 --- a/db/dbhelpers.h +++ b/db/dbhelpers.h @@ -24,7 +24,6 @@ #include "../stdafx.h" #include "client.h" -#include "dbinfo.h" #include "db.h" namespace mongo { diff --git a/db/dbinfo.cpp b/db/dbinfo.cpp deleted file mode 100644 index bbae1428f76..00000000000 --- a/db/dbinfo.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// dbinfo.cpp - -/** -* Copyright (C) 2008 10gen Inc. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License, version 3, -* as published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "stdafx.h" -#include "db.h" -#include "query.h" - -namespace mongo { - - void DBInfo::dbDropped() { - BSONObj empty; - deleteObjects(ns.c_str(), empty, false); - - /* do we also need to clear the info in 'dbs' in local.sources if we - are a slave? - TODO if so. need to be careful not to mess up replications of dropDatabase(). - */ - } - - -} // namespace mongo diff --git a/db/dbinfo.h b/db/dbinfo.h deleted file mode 100644 index 30874e83d1d..00000000000 --- a/db/dbinfo.h +++ /dev/null @@ -1,59 +0,0 @@ -// dbinfo.h - -/** -* Copyright (C) 2008 10gen Inc. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License, version 3, -* as published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "dbhelpers.h" - -namespace mongo { - - class DBContext; - - /* this is an "accessor" class to data held in local.dbinfo.<dbname> - - system.dbinfo contains: - attributes will be added later. - */ - class DBInfo { - string ns; - DBContext *context; - public: - ~DBInfo() { - delete context; - } - DBInfo(const char *db) - { - ns = string("local.dbinfo.") + db; - context = new DBContext(ns); - } - - BSONObj getDbInfoObj() { - auto_ptr<Cursor> c = DataFileMgr::findAll(ns.c_str()); - if ( !c->ok() ) - return BSONObj(); - return c->current(); - } - - void dbDropped(); - }; - - /* inline void Database::finishInit() { - DBInfo i(name.c_str()); - }*/ - -} // namespace mongo diff --git a/db/instance.cpp b/db/instance.cpp index 5326fd02795..89c7e26bdbe 100644 --- a/db/instance.cpp +++ b/db/instance.cpp @@ -427,10 +427,11 @@ namespace mongo { Database *database = cc().database(); assert( database ); assert( database->name == cl ); + /* if ( string("local") != cl ) { DBInfo i(cl); i.dbDropped(); - } + }*/ /* important: kill all open cursors on the database */ string prefix(cl); diff --git a/db/namespace.cpp b/db/namespace.cpp index cb412b21792..0558304755e 100644 --- a/db/namespace.cpp +++ b/db/namespace.cpp @@ -59,11 +59,12 @@ namespace mongo { we need to be sure to clear any cached info for the database in local.*. */ + /* if ( "local" != database_ ) { DBInfo i(database_.c_str()); i.dbDropped(); } - + */ int len = -1; boost::filesystem::path nsPath = path(); string pathString = nsPath.string(); diff --git a/s/s_only.cpp b/s/s_only.cpp index 89d358f117f..8014f90af25 100644 --- a/s/s_only.cpp +++ b/s/s_only.cpp @@ -17,7 +17,6 @@ #include "../stdafx.h" #include "../client/dbclient.h" -#include "../db/dbinfo.h" #include "../db/dbhelpers.h" namespace mongo { diff --git a/scripting/engine.cpp b/scripting/engine.cpp index b7fd209544e..24d89fbfee7 100644 --- a/scripting/engine.cpp +++ b/scripting/engine.cpp @@ -19,7 +19,6 @@ #include "engine.h" #include "../util/file.h" #include "../client/dbclient.h" -#include "../db/dbinfo.h" namespace mongo { |