summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-03-04 17:28:45 -0500
committerEliot Horowitz <eliot@10gen.com>2014-04-03 13:31:48 -0400
commit7c249de45bf8c92359e01fd3b9b0c5a66a4f956d (patch)
tree97cbd66f5ec0a18065b9d1d823ed0d23f8fab1c4 /src
parent3aacfc36f6aa0a1ee31be5af566cc8a45d32e7d8 (diff)
downloadmongo-7c249de45bf8c92359e01fd3b9b0c5a66a4f956d.tar.gz
SERVER-11643: remove pdfile.h include all mess
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/catalog/collection_info_cache.cpp2
-rw-r--r--src/mongo/db/catalog/database.cpp1
-rw-r--r--src/mongo/db/catalog/index_catalog.cpp1
-rw-r--r--src/mongo/db/commands/distinct.cpp1
-rw-r--r--src/mongo/db/commands/drop_indexes.cpp1
-rw-r--r--src/mongo/db/commands/geonear.cpp1
-rw-r--r--src/mongo/db/commands/touch.cpp1
-rw-r--r--src/mongo/db/db.cpp2
-rw-r--r--src/mongo/db/exec/2d.cpp2
-rw-r--r--src/mongo/db/exec/2dnear.cpp2
-rw-r--r--src/mongo/db/exec/fetch.cpp1
-rw-r--r--src/mongo/db/exec/stagedebug_cmd.cpp2
-rw-r--r--src/mongo/db/geo/haystack.cpp1
-rw-r--r--src/mongo/db/index_rebuilder.cpp1
-rw-r--r--src/mongo/db/pagefault.cpp3
-rw-r--r--src/mongo/db/pdfile.h25
-rw-r--r--src/mongo/db/pipeline/pipeline_d.cpp1
-rw-r--r--src/mongo/db/query/stage_builder.cpp2
-rw-r--r--src/mongo/db/queryutil.cpp3
-rw-r--r--src/mongo/db/repl/rs_sync.cpp11
-rw-r--r--src/mongo/db/repl/sync.cpp1
-rw-r--r--src/mongo/db/storage/extent.cpp5
-rw-r--r--src/mongo/db/storage/extent_manager.cpp2
-rw-r--r--src/mongo/db/structure/catalog/namespace_details-inl.h44
-rw-r--r--src/mongo/db/structure/catalog/namespace_details.cpp7
-rw-r--r--src/mongo/db/structure/record_store.cpp10
-rw-r--r--src/mongo/dbtests/pdfiletests.cpp1
-rw-r--r--src/mongo/dbtests/query_stage_collscan.cpp2
-rw-r--r--src/mongo/dbtests/queryutiltests.cpp4
-rw-r--r--src/mongo/dbtests/runner_registry.cpp1
-rw-r--r--src/mongo/s/config.cpp1
31 files changed, 59 insertions, 83 deletions
diff --git a/src/mongo/db/catalog/collection_info_cache.cpp b/src/mongo/db/catalog/collection_info_cache.cpp
index 9d43035bbd4..80c54972a21 100644
--- a/src/mongo/db/catalog/collection_info_cache.cpp
+++ b/src/mongo/db/catalog/collection_info_cache.cpp
@@ -32,13 +32,11 @@
#include "mongo/db/d_concurrency.h"
#include "mongo/db/structure/catalog/namespace_details.h"
-#include "mongo/db/structure/catalog/namespace_details-inl.h"
#include "mongo/db/query/plan_cache.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/util/debug_util.h"
#include "mongo/db/structure/catalog/index_details.h" // XXX
-#include "mongo/db/pdfile.h" // XXX
namespace mongo {
diff --git a/src/mongo/db/catalog/database.cpp b/src/mongo/db/catalog/database.cpp
index 5605f5b4a30..f564c9942e7 100644
--- a/src/mongo/db/catalog/database.cpp
+++ b/src/mongo/db/catalog/database.cpp
@@ -48,6 +48,7 @@
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/ops/delete.h"
#include "mongo/db/server_parameters.h"
+#include "mongo/db/storage/data_file.h"
#include "mongo/db/storage_options.h"
#include "mongo/db/catalog/collection.h"
diff --git a/src/mongo/db/catalog/index_catalog.cpp b/src/mongo/db/catalog/index_catalog.cpp
index aa8fb2a0bb8..6f5d3fc49d1 100644
--- a/src/mongo/db/catalog/index_catalog.cpp
+++ b/src/mongo/db/catalog/index_catalog.cpp
@@ -60,7 +60,6 @@
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/repl/rs.h" // this is ugly
#include "mongo/db/storage/data_file.h"
-#include "mongo/db/structure/catalog/namespace_details-inl.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp
index 154015d75bc..c6537e25e52 100644
--- a/src/mongo/db/commands/distinct.cpp
+++ b/src/mongo/db/commands/distinct.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/auth/action_set.h"
#include "mongo/db/auth/action_type.h"
#include "mongo/db/auth/privilege.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/clientcursor.h"
#include "mongo/db/commands.h"
#include "mongo/db/instance.h"
diff --git a/src/mongo/db/commands/drop_indexes.cpp b/src/mongo/db/commands/drop_indexes.cpp
index 0f2fdce6dc5..8945d6c88d0 100644
--- a/src/mongo/db/commands/drop_indexes.cpp
+++ b/src/mongo/db/commands/drop_indexes.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/instance.h"
#include "mongo/db/catalog/collection.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/catalog/index_catalog.h"
#include "mongo/db/catalog/index_key_validate.h"
#include "mongo/db/pdfile.h"
diff --git a/src/mongo/db/commands/geonear.cpp b/src/mongo/db/commands/geonear.cpp
index 56d062fbdbe..f2c058943ca 100644
--- a/src/mongo/db/commands/geonear.cpp
+++ b/src/mongo/db/commands/geonear.cpp
@@ -31,6 +31,7 @@
#include "mongo/db/auth/action_set.h"
#include "mongo/db/auth/action_type.h"
#include "mongo/db/auth/privilege.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/commands.h"
#include "mongo/db/curop.h"
#include "mongo/db/geo/geoconstants.h"
diff --git a/src/mongo/db/commands/touch.cpp b/src/mongo/db/commands/touch.cpp
index bf85a14697b..3c37b606224 100644
--- a/src/mongo/db/commands/touch.cpp
+++ b/src/mongo/db/commands/touch.cpp
@@ -40,6 +40,7 @@
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/privilege.h"
#include "mongo/db/catalog/collection.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/commands.h"
#include "mongo/db/curop-inl.h"
#include "mongo/db/d_concurrency.h"
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index 2a5562d08bf..795d36094b3 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -61,6 +61,7 @@
#include "mongo/db/kill_current_op.h"
#include "mongo/db/log_process_details.h"
#include "mongo/db/mongod_options.h"
+#include "mongo/db/pdfile_version.h"
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/range_deleter_service.h"
#include "mongo/db/repair_database.h"
@@ -71,6 +72,7 @@
#include "mongo/db/startup_warnings.h"
#include "mongo/db/stats/counters.h"
#include "mongo/db/stats/snapshots.h"
+#include "mongo/db/storage/data_file.h"
#include "mongo/db/storage_options.h"
#include "mongo/db/ttl.h"
#include "mongo/platform/process_id.h"
diff --git a/src/mongo/db/exec/2d.cpp b/src/mongo/db/exec/2d.cpp
index ec6781f25af..7c5da3f4141 100644
--- a/src/mongo/db/exec/2d.cpp
+++ b/src/mongo/db/exec/2d.cpp
@@ -28,6 +28,8 @@
#include "mongo/db/exec/2d.h"
+#include "mongo/db/catalog/database.h"
+#include "mongo/db/client.h"
#include "mongo/db/exec/working_set_common.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/catalog/collection.h"
diff --git a/src/mongo/db/exec/2dnear.cpp b/src/mongo/db/exec/2dnear.cpp
index 5f27fab1581..d739c4ca8b7 100644
--- a/src/mongo/db/exec/2dnear.cpp
+++ b/src/mongo/db/exec/2dnear.cpp
@@ -28,6 +28,8 @@
#include "mongo/db/exec/2dnear.h"
+#include "mongo/db/catalog/database.h"
+#include "mongo/db/client.h"
#include "mongo/db/exec/working_set_common.h"
#include "mongo/db/exec/working_set_computed_data.h"
#include "mongo/db/jsobj.h"
diff --git a/src/mongo/db/exec/fetch.cpp b/src/mongo/db/exec/fetch.cpp
index d255050fffa..986da2570b6 100644
--- a/src/mongo/db/exec/fetch.cpp
+++ b/src/mongo/db/exec/fetch.cpp
@@ -32,6 +32,7 @@
#include "mongo/db/exec/working_set_common.h"
#include "mongo/db/pdfile.h"
#include "mongo/util/fail_point_service.h"
+#include "mongo/util/mongoutils/str.h"
namespace mongo {
diff --git a/src/mongo/db/exec/stagedebug_cmd.cpp b/src/mongo/db/exec/stagedebug_cmd.cpp
index 2d5c06dee55..ddba9774f4a 100644
--- a/src/mongo/db/exec/stagedebug_cmd.cpp
+++ b/src/mongo/db/exec/stagedebug_cmd.cpp
@@ -29,7 +29,9 @@
#include "mongo/db/auth/action_set.h"
#include "mongo/db/auth/action_type.h"
#include "mongo/db/auth/privilege.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/commands.h"
+#include "mongo/db/client.h"
#include "mongo/db/exec/and_hash.h"
#include "mongo/db/exec/and_sorted.h"
#include "mongo/db/exec/collection_scan.h"
diff --git a/src/mongo/db/geo/haystack.cpp b/src/mongo/db/geo/haystack.cpp
index 27a78ba1511..8ed4c0f4ce3 100644
--- a/src/mongo/db/geo/haystack.cpp
+++ b/src/mongo/db/geo/haystack.cpp
@@ -38,7 +38,6 @@
#include "mongo/db/index/index_access_method.h"
#include "mongo/db/index_names.h"
#include "mongo/db/jsobj.h"
-#include "mongo/db/structure/catalog/namespace_details-inl.h"
#include "mongo/db/pdfile.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/commands.h"
diff --git a/src/mongo/db/index_rebuilder.cpp b/src/mongo/db/index_rebuilder.cpp
index d713226b318..734b7bf75b2 100644
--- a/src/mongo/db/index_rebuilder.cpp
+++ b/src/mongo/db/index_rebuilder.cpp
@@ -30,6 +30,7 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/auth/user_name.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/client.h"
#include "mongo/db/instance.h"
#include "mongo/db/pdfile.h"
diff --git a/src/mongo/db/pagefault.cpp b/src/mongo/db/pagefault.cpp
index 1c4de1b1142..44d94b0f754 100644
--- a/src/mongo/db/pagefault.cpp
+++ b/src/mongo/db/pagefault.cpp
@@ -37,8 +37,9 @@
#include "mongo/db/diskloc.h"
#include "mongo/db/pdfile.h"
#include "mongo/server.h"
+#include "mongo/util/mmap.h"
-namespace mongo {
+namespace mongo {
PageFaultException::PageFaultException(const Record *_r)
{
diff --git a/src/mongo/db/pdfile.h b/src/mongo/db/pdfile.h
index c964e5a4b4c..83774d88538 100644
--- a/src/mongo/db/pdfile.h
+++ b/src/mongo/db/pdfile.h
@@ -37,35 +37,20 @@
#pragma once
-#include "mongo/db/client.h"
-#include "mongo/db/catalog/database.h"
-#include "mongo/db/diskloc.h"
-#include "mongo/db/storage/data_file.h"
-#include "mongo/db/storage/durable_mapped_file.h"
-#include "mongo/db/storage/extent.h"
-#include "mongo/db/structure/catalog/namespace_details-inl.h"
-#include "mongo/db/namespace_string.h"
-#include "mongo/db/pdfile_version.h"
-#include "mongo/platform/cstdint.h"
-#include "mongo/util/log.h"
-#include "mongo/util/mmap.h"
+#include <string>
-namespace mongo {
+#include "mongo/db/jsobj.h"
+#include "mongo/db/storage/record.h"
- class DataFileHeader;
- class Extent;
- class OpDebug;
- class Record;
+namespace mongo {
void dropDatabase(const std::string& db);
- bool userCreateNS(const char *ns, BSONObj j, string& err,
+ bool userCreateNS(const char *ns, BSONObj j, std::string& err,
bool logForReplication, bool createDefaultIndexes = true );
/*---------------------------------------------------------------------*/
- BOOST_STATIC_ASSERT( 16 == sizeof(DeletedRecord) );
-
inline BSONObj BSONObj::make(const Record* r ) {
return BSONObj( r->data() );
}
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp
index ae1b42ce887..15615a4cbe5 100644
--- a/src/mongo/db/pipeline/pipeline_d.cpp
+++ b/src/mongo/db/pipeline/pipeline_d.cpp
@@ -32,6 +32,7 @@
#include "mongo/client/dbclientinterface.h"
#include "mongo/db/catalog/collection.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/instance.h"
#include "mongo/db/pdfile.h"
#include "mongo/db/pipeline/document_source.h"
diff --git a/src/mongo/db/query/stage_builder.cpp b/src/mongo/db/query/stage_builder.cpp
index eb4efd31613..6e71b1db934 100644
--- a/src/mongo/db/query/stage_builder.cpp
+++ b/src/mongo/db/query/stage_builder.cpp
@@ -28,6 +28,7 @@
#include "mongo/db/query/stage_builder.h"
+#include "mongo/db/client.h"
#include "mongo/db/exec/2d.h"
#include "mongo/db/exec/2dnear.h"
#include "mongo/db/exec/and_hash.h"
@@ -50,6 +51,7 @@
#include "mongo/db/index/fts_access_method.h"
#include "mongo/db/structure/catalog/namespace_details.h"
#include "mongo/db/catalog/collection.h"
+#include "mongo/db/catalog/database.h"
namespace mongo {
diff --git a/src/mongo/db/queryutil.cpp b/src/mongo/db/queryutil.cpp
index 773833d78ae..240c62b3567 100644
--- a/src/mongo/db/queryutil.cpp
+++ b/src/mongo/db/queryutil.cpp
@@ -20,10 +20,13 @@
#include "mongo/db/index_names.h"
#include "mongo/db/matcher.h"
#include "mongo/db/pdfile.h"
+#include "mongo/db/structure/catalog/namespace_details.h"
#include "mongo/util/mongoutils/str.h"
namespace mongo {
+ using namespace mongoutils::str;
+
extern BSONObj staticNull;
extern BSONObj staticUndefined;
diff --git a/src/mongo/db/repl/rs_sync.cpp b/src/mongo/db/repl/rs_sync.cpp
index 4c34246fd95..88275b981d2 100644
--- a/src/mongo/db/repl/rs_sync.cpp
+++ b/src/mongo/db/repl/rs_sync.cpp
@@ -34,9 +34,12 @@
#include "third_party/murmurhash3/MurmurHash3.h"
+#include "mongo/base/counter.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/client.h"
-#include "mongo/db/curop.h"
#include "mongo/db/commands/fsync.h"
+#include "mongo/db/commands/server_status.h"
+#include "mongo/db/curop.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/prefetch.h"
@@ -45,13 +48,9 @@
#include "mongo/db/repl/rs.h"
#include "mongo/db/repl/rs_sync.h"
#include "mongo/db/server_parameters.h"
+#include "mongo/db/stats/timer_stats.h"
#include "mongo/db/storage_options.h"
#include "mongo/util/fail_point_service.h"
-#include "mongo/db/commands/server_status.h"
-#include "mongo/db/stats/timer_stats.h"
-#include "mongo/base/counter.h"
-
-
namespace mongo {
diff --git a/src/mongo/db/repl/sync.cpp b/src/mongo/db/repl/sync.cpp
index 893226b01a4..f09d06355a5 100644
--- a/src/mongo/db/repl/sync.cpp
+++ b/src/mongo/db/repl/sync.cpp
@@ -31,6 +31,7 @@
#include <string>
#include "mongo/db/jsobj.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/client.h"
#include "mongo/db/diskloc.h"
#include "mongo/db/structure/catalog/namespace_details.h"
diff --git a/src/mongo/db/storage/extent.cpp b/src/mongo/db/storage/extent.cpp
index 1ce71d678d5..8d09958f9a4 100644
--- a/src/mongo/db/storage/extent.cpp
+++ b/src/mongo/db/storage/extent.cpp
@@ -33,12 +33,11 @@
#include "mongo/db/storage/extent.h"
#include "mongo/db/dur.h"
+#include "mongo/db/storage/data_file.h"
#include "mongo/db/storage/extent_manager.h"
+#include "mongo/db/storage/record.h"
#include "mongo/util/mongoutils/str.h"
-// XXX-ERH
-#include "mongo/db/pdfile.h"
-
namespace mongo {
BOOST_STATIC_ASSERT( sizeof(Extent)-4 == 48+128 );
diff --git a/src/mongo/db/storage/extent_manager.cpp b/src/mongo/db/storage/extent_manager.cpp
index 013c938cd81..c6340f15586 100644
--- a/src/mongo/db/storage/extent_manager.cpp
+++ b/src/mongo/db/storage/extent_manager.cpp
@@ -35,9 +35,11 @@
#include "mongo/db/audit.h"
#include "mongo/db/client.h"
#include "mongo/db/d_concurrency.h"
+#include "mongo/db/dur.h"
#include "mongo/db/storage/data_file.h"
#include "mongo/db/storage/extent.h"
#include "mongo/db/storage/extent_manager.h"
+#include "mongo/db/structure/catalog/namespace_details.h"
#include "mongo/db/pdfile.h"
diff --git a/src/mongo/db/structure/catalog/namespace_details-inl.h b/src/mongo/db/structure/catalog/namespace_details-inl.h
deleted file mode 100644
index 755d9606290..00000000000
--- a/src/mongo/db/structure/catalog/namespace_details-inl.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// namespace_details-inl.h
-
-/**
-* Copyright (C) 2009 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/>.
-*
-* As a special exception, the copyright holders give permission to link the
-* code of portions of this program with the OpenSSL library under certain
-* conditions as described in each individual source file and distribute
-* linked combinations including the program with the OpenSSL library. You
-* must comply with the GNU Affero General Public License in all respects for
-* all of the code used other than as permitted herein. If you modify file(s)
-* with this exception, you may extend this exception to your version of the
-* file(s), but you are not obligated to do so. If you do not wish to do so,
-* delete this exception statement from your version. If you delete this
-* exception statement from all source files in the program, then also delete
-* it in the license file.
-*/
-
-#pragma once
-
-#include "mongo/db/structure/catalog/namespace_details.h"
-
-namespace mongo {
-
- inline NamespaceDetails::IndexIterator::IndexIterator(NamespaceDetails *_d,
- bool includeBackgroundInProgress) {
- d = _d;
- i = 0;
- n = includeBackgroundInProgress ? d->getTotalIndexCount() : d->_nIndexes;
- }
-
-}
diff --git a/src/mongo/db/structure/catalog/namespace_details.cpp b/src/mongo/db/structure/catalog/namespace_details.cpp
index 65da036f833..5d7df82db80 100644
--- a/src/mongo/db/structure/catalog/namespace_details.cpp
+++ b/src/mongo/db/structure/catalog/namespace_details.cpp
@@ -474,6 +474,13 @@ namespace mongo {
return e->details[i];
}
+ NamespaceDetails::IndexIterator::IndexIterator(NamespaceDetails *_d,
+ bool includeBackgroundInProgress) {
+ d = _d;
+ i = 0;
+ n = includeBackgroundInProgress ? d->getTotalIndexCount() : d->_nIndexes;
+ }
+
// must be called when renaming a NS to fix up extra
void NamespaceDetails::copyingFrom( const char* thisns,
NamespaceIndex& ni,
diff --git a/src/mongo/db/structure/record_store.cpp b/src/mongo/db/structure/record_store.cpp
index bbc977f0e8e..957ec214689 100644
--- a/src/mongo/db/structure/record_store.cpp
+++ b/src/mongo/db/structure/record_store.cpp
@@ -30,11 +30,13 @@
#include "mongo/db/structure/record_store.h"
-#include "mongo/db/storage/extent.h"
#include "mongo/db/catalog/collection.h"
-
-
-#include "mongo/db/pdfile.h" // XXX-ERH
+#include "mongo/db/dur.h"
+#include "mongo/db/storage/extent.h"
+#include "mongo/db/storage/extent_manager.h"
+#include "mongo/db/storage/record.h"
+#include "mongo/db/structure/catalog/namespace_details.h"
+#include "mongo/util/mmap.h"
namespace mongo {
diff --git a/src/mongo/dbtests/pdfiletests.cpp b/src/mongo/dbtests/pdfiletests.cpp
index d3a8580acdc..cba1809fe50 100644
--- a/src/mongo/dbtests/pdfiletests.cpp
+++ b/src/mongo/dbtests/pdfiletests.cpp
@@ -36,6 +36,7 @@
#include "mongo/db/pdfile.h"
#include "mongo/db/ops/insert.h"
#include "mongo/db/catalog/collection.h"
+#include "mongo/db/storage/data_file.h"
#include "mongo/dbtests/dbtests.h"
namespace PdfileTests {
diff --git a/src/mongo/dbtests/query_stage_collscan.cpp b/src/mongo/dbtests/query_stage_collscan.cpp
index c10c8662607..c5692580dc9 100644
--- a/src/mongo/dbtests/query_stage_collscan.cpp
+++ b/src/mongo/dbtests/query_stage_collscan.cpp
@@ -31,6 +31,7 @@
*/
#include "mongo/client/dbclientcursor.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/exec/collection_scan.h"
#include "mongo/db/exec/plan_stage.h"
#include "mongo/db/instance.h"
@@ -38,6 +39,7 @@
#include "mongo/db/matcher/expression_parser.h"
#include "mongo/db/pdfile.h"
#include "mongo/db/query/plan_executor.h"
+#include "mongo/db/structure/catalog/namespace_details.h"
#include "mongo/dbtests/dbtests.h"
#include "mongo/util/fail_point_service.h"
diff --git a/src/mongo/dbtests/queryutiltests.cpp b/src/mongo/dbtests/queryutiltests.cpp
index dea9349d0f7..46ded5aada3 100644
--- a/src/mongo/dbtests/queryutiltests.cpp
+++ b/src/mongo/dbtests/queryutiltests.cpp
@@ -31,11 +31,13 @@
#include "mongo/pch.h"
+#include "mongo/db/catalog/collection.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/instance.h"
#include "mongo/db/json.h"
#include "mongo/db/pdfile.h"
#include "mongo/db/queryutil.h"
-#include "mongo/db/catalog/collection.h"
+#include "mongo/db/structure/catalog/namespace_details.h"
#include "mongo/dbtests/dbtests.h"
namespace QueryUtilTests {
diff --git a/src/mongo/dbtests/runner_registry.cpp b/src/mongo/dbtests/runner_registry.cpp
index 9b53453afd4..5e4bc4645dd 100644
--- a/src/mongo/dbtests/runner_registry.cpp
+++ b/src/mongo/dbtests/runner_registry.cpp
@@ -32,6 +32,7 @@
*/
#include "mongo/client/dbclientcursor.h"
+#include "mongo/db/catalog/database.h"
#include "mongo/db/exec/collection_scan.h"
#include "mongo/db/exec/plan_stage.h"
#include "mongo/db/instance.h"
diff --git a/src/mongo/s/config.cpp b/src/mongo/s/config.cpp
index f1d27e09f6b..6bc400d35b9 100644
--- a/src/mongo/s/config.cpp
+++ b/src/mongo/s/config.cpp
@@ -34,6 +34,7 @@
#include "mongo/client/connpool.h"
#include "mongo/client/dbclientcursor.h"
+#include "mongo/db/client.h"
#include "mongo/db/lasterror.h"
#include "mongo/db/pdfile.h"
#include "mongo/db/write_concern.h"