Skip to content

Commit

Permalink
SERVER-14668 Move locking related files to be under mongo/db/concurrency
Browse files Browse the repository at this point in the history
Also performs some cleanup of the includes around locking.
  • Loading branch information
kaloianm committed Aug 13, 2014
1 parent 2fd6a44 commit c610cfe
Show file tree
Hide file tree
Showing 35 changed files with 41 additions and 48 deletions.
3 changes: 0 additions & 3 deletions src/mongo/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,6 @@ serverOnlyFiles = [ "db/curop.cpp",
"db/d_globals.cpp",
"util/compress.cpp",
"db/ttl.cpp",
"db/d_concurrency.cpp",
"db/lockstat.cpp",
"db/lockstate.cpp",
"util/logfile.cpp",
"util/alignedbuilder.cpp",
"util/elapsed_tracker.cpp",
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/auth/authz_session_external_state_d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/client.h"
#include "mongo/db/dbhelpers.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/instance.h"
#include "mongo/db/jsobj.h"
#include "mongo/scripting/engine.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/catalog/collection_info_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "mongo/db/catalog/collection_info_cache.h"

#include "mongo/db/catalog/collection.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/fts/fts_spec.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/index_legacy.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/catalog/database_holder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "mongo/db/clientcursor.h"
#include "mongo/db/catalog/database_catalog_entry.h"
#include "mongo/db/catalog/database_holder.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/global_environment_experiment.h"
#include "mongo/db/operation_context_impl.h"
#include "mongo/db/storage/mmap_v1/dur.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/catalog/database_holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "mongo/base/string_data.h"
#include "mongo/db/catalog/database.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/namespace_string.h"
#include "mongo/util/string_map.h"

Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#pragma once

#include "mongo/db/client_basic.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/lasterror.h"
#include "mongo/db/repl/rs.h"
#include "mongo/db/stats/top.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/commands/compact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "mongo/db/catalog/database.h"
#include "mongo/db/commands.h"
#include "mongo/db/curop.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/index_builder.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/operation_context_impl.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/commands/fsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "mongo/db/auth/action_type.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/privilege.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/commands.h"
#include "mongo/db/global_environment_experiment.h"
#include "mongo/db/storage/mmap_v1/dur.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/commands/touch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "mongo/db/catalog/database.h"
#include "mongo/db/commands.h"
#include "mongo/db/curop.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/operation_context_impl.h"
#include "mongo/util/timer.h"
Expand Down
3 changes: 3 additions & 0 deletions src/mongo/db/concurrency/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ env.Library(
target='lock_mgr',
source=[
'lock_mgr.cpp',
'd_concurrency.cpp',
'lock_stat.cpp',
'lock_state.cpp'
],
LIBDEPS=[
'$BUILD_DIR/mongo/base/base',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,18 @@

#include "mongo/platform/basic.h"

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"

#include "mongo/db/client.h"
#include "mongo/db/commands/server_status.h"
#include "mongo/db/curop.h"
#include "mongo/db/d_globals.h"
#include "mongo/db/global_environment_experiment.h"
#include "mongo/db/lockstat.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/concurrency/lock_stat.h"
#include "mongo/db/server_parameters.h"
#include "mongo/db/operation_context.h"
#include "mongo/server.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/concurrency/mapsf.h"
#include "mongo/util/concurrency/qlock.h"
#include "mongo/util/concurrency/rwlock.h"
#include "mongo/util/concurrency/threadlocal.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/stacktrace.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include "mongo/base/string_data.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/lockstat.h"
#include "mongo/db/concurrency/lock_stat.h"
#include "mongo/util/concurrency/mutex.h"
#include "mongo/util/concurrency/rwlock.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// lockstat.cpp
// lock_stat.cpp

/**
* Copyright (C) 2008 10gen Inc.
Expand Down Expand Up @@ -29,9 +29,9 @@
*/


#include "mongo/pch.h"
#include "mongo/platform/basic.h"

#include "mongo/db/lockstat.h"
#include "mongo/db/concurrency/lock_stat.h"

#include "mongo/db/jsobj.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// lockstat.h
// lock_stat.h

/**
* Copyright (C) 2008 10gen Inc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* it in the license file.
*/

#include "mongo/db/lockstate.h"
#include "mongo/db/concurrency/lock_state.h"

#include "mongo/db/namespace_string.h"
#include "mongo/util/log.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// lockstate.h
// lock_state.h

/**
* Copyright (C) 2008 10gen Inc.
Expand Down Expand Up @@ -31,7 +31,8 @@

#pragma once

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"


namespace mongo {

Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "mongo/db/clientcursor.h"
#include "mongo/db/commands/server_status.h"
#include "mongo/db/commands/server_status_metric.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/d_globals.h"
#include "mongo/db/db.h"
#include "mongo/db/dbmessage.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/index_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "mongo/db/curop.h"
#include "mongo/db/catalog/database.h"
#include "mongo/db/catalog/database_holder.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/repl/rs.h"
#include "mongo/db/operation_context_impl.h"
#include "mongo/util/log.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "mongo/db/background.h"
#include "mongo/db/clientcursor.h"
#include "mongo/db/commands/fsync.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/db.h"
#include "mongo/db/dbhelpers.h"
#include "mongo/db/dbmessage.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/operation_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include "mongo/base/status.h"
#include "mongo/base/string_data.h"
#include "mongo/db/storage/recovery_unit.h"
#include "mongo/db/lockstate.h"
#include "mongo/db/concurrency/lock_mgr.h"
#include "mongo/db/concurrency/lock_state.h"


namespace mongo {
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/repl/network_interface_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "mongo/db/repl/network_interface_impl.h"

#include "mongo/client/connpool.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/operation_context_impl.h"
#include "mongo/util/assert_util.h"

Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/repl/rs_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#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/concurrency/d_concurrency.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/prefetch.h"
#include "mongo/db/repl/bgsync.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/stats/snapshots_webplugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "mongo/platform/basic.h"

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/dbwebserver.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/stats/snapshots.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/storage/mmap_v1/catalog/namespace_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#include <boost/filesystem/operations.hpp>

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/mmap_v1/catalog/namespace_details.h"
#include "mongo/util/exit.h"
Expand Down
5 changes: 2 additions & 3 deletions src/mongo/db/storage/mmap_v1/data_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@

#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kStorage

#include "mongo/pch.h"
#include "mongo/platform/basic.h"

#include "mongo/db/storage/mmap_v1/data_file.h"

#include <boost/filesystem/operations.hpp>

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/lockstate.h"
#include "mongo/db/operation_context.h"
#include "mongo/util/file_allocator.h"
#include "mongo/util/log.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/storage/mmap_v1/dur_commitjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#pragma once

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/durop.h"
#include "mongo/util/alignedbuilder.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/storage/mmap_v1/durable_mapped_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "mongo/db/storage/mmap_v1/durable_mapped_file.h"


#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/storage_options.h"
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/storage/mmap_v1/durop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "mongo/db/storage/mmap_v1/durop.h"

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/storage/mmap_v1/durable_mapped_file.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_engine.h"
#include "mongo/util/alignedbuilder.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/db/storage/mmap_v1/mmap_v1_extent_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include "mongo/db/audit.h"
#include "mongo/db/client.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/data_file.h"
#include "mongo/db/storage/mmap_v1/record.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/dbtests/commandtests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "mongo/platform/basic.h"

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/operation_context_impl.h"
#include "mongo/dbtests/dbtests.h"

Expand Down
2 changes: 1 addition & 1 deletion src/mongo/dbtests/threadedtests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#include <boost/thread.hpp>

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/operation_context_impl.h"
#include "mongo/dbtests/dbtests.h"
#include "mongo/platform/atomic_word.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/s/d_merge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

#include "mongo/base/owned_pointer_vector.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/operation_context.h"
#include "mongo/s/d_logic.h"
Expand Down
2 changes: 0 additions & 2 deletions src/mongo/s/s_only.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ namespace mongo {

TSP_DEFINE(Client,currentClient)

LockState::LockState(){} // ugh

Client::Client(const string& desc, AbstractMessagingPort *p) :
ClientBasic(p),
_shutdown(false),
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/util/mmap_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <sys/types.h>

#include "mongo/platform/atomic_word.h"
#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/util/file_allocator.h"
#include "mongo/util/log.h"
#include "mongo/util/mmap.h"
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/util/mmap_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include "mongo/pch.h"

#include "mongo/db/d_concurrency.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/storage/mmap_v1/durable_mapped_file.h"
#include "mongo/util/file_allocator.h"
#include "mongo/util/log.h"
Expand Down

0 comments on commit c610cfe

Please sign in to comment.