diff options
Diffstat (limited to 'src/mongo/db/s')
48 files changed, 116 insertions, 92 deletions
diff --git a/src/mongo/db/s/active_migrations_registry.h b/src/mongo/db/s/active_migrations_registry.h index 6c62ab2b30d..d2e3f4b2ad0 100644 --- a/src/mongo/db/s/active_migrations_registry.h +++ b/src/mongo/db/s/active_migrations_registry.h @@ -31,7 +31,6 @@ #include <boost/optional.hpp> -#include "mongo/base/disallow_copying.h" #include "mongo/db/s/migration_session_id.h" #include "mongo/s/request_types/move_chunk_request.h" #include "mongo/stdx/memory.h" @@ -51,7 +50,8 @@ class StatusWith; * to only one per shard. There is only one instance of this object per shard. */ class ActiveMigrationsRegistry { - MONGO_DISALLOW_COPYING(ActiveMigrationsRegistry); + ActiveMigrationsRegistry(const ActiveMigrationsRegistry&) = delete; + ActiveMigrationsRegistry& operator=(const ActiveMigrationsRegistry&) = delete; public: ActiveMigrationsRegistry(); @@ -167,7 +167,8 @@ private: * registerDonateChunk method for more details. */ class ScopedDonateChunk { - MONGO_DISALLOW_COPYING(ScopedDonateChunk); + ScopedDonateChunk(const ScopedDonateChunk&) = delete; + ScopedDonateChunk& operator=(const ScopedDonateChunk&) = delete; public: ScopedDonateChunk(ActiveMigrationsRegistry* registry, @@ -220,7 +221,8 @@ private: * registry. */ class ScopedReceiveChunk { - MONGO_DISALLOW_COPYING(ScopedReceiveChunk); + ScopedReceiveChunk(const ScopedReceiveChunk&) = delete; + ScopedReceiveChunk& operator=(const ScopedReceiveChunk&) = delete; public: ScopedReceiveChunk(ActiveMigrationsRegistry* registry); diff --git a/src/mongo/db/s/active_move_primaries_registry.h b/src/mongo/db/s/active_move_primaries_registry.h index 544300ec347..8ddd051478e 100644 --- a/src/mongo/db/s/active_move_primaries_registry.h +++ b/src/mongo/db/s/active_move_primaries_registry.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/s/request_types/move_primary_gen.h" #include "mongo/util/concurrency/notification.h" @@ -43,7 +42,8 @@ class ScopedMovePrimary; */ class ActiveMovePrimariesRegistry { - MONGO_DISALLOW_COPYING(ActiveMovePrimariesRegistry); + ActiveMovePrimariesRegistry(const ActiveMovePrimariesRegistry&) = delete; + ActiveMovePrimariesRegistry& operator=(const ActiveMovePrimariesRegistry&) = delete; public: ActiveMovePrimariesRegistry(); @@ -112,7 +112,8 @@ private: * registerMovePrimary for more details. */ class ScopedMovePrimary { - MONGO_DISALLOW_COPYING(ScopedMovePrimary); + ScopedMovePrimary(const ScopedMovePrimary&) = delete; + ScopedMovePrimary& operator=(const ScopedMovePrimary&) = delete; public: ScopedMovePrimary(ActiveMovePrimariesRegistry* registry, diff --git a/src/mongo/db/s/active_shard_collection_registry.h b/src/mongo/db/s/active_shard_collection_registry.h index 5da43ed446b..cab710b5ee5 100644 --- a/src/mongo/db/s/active_shard_collection_registry.h +++ b/src/mongo/db/s/active_shard_collection_registry.h @@ -31,7 +31,6 @@ #include <boost/optional.hpp> -#include "mongo/base/disallow_copying.h" #include "mongo/s/request_types/shard_collection_gen.h" #include "mongo/stdx/memory.h" #include "mongo/stdx/mutex.h" @@ -49,7 +48,8 @@ class StatusWith; * one instance of this object per shard. */ class ActiveShardCollectionRegistry { - MONGO_DISALLOW_COPYING(ActiveShardCollectionRegistry); + ActiveShardCollectionRegistry(const ActiveShardCollectionRegistry&) = delete; + ActiveShardCollectionRegistry& operator=(const ActiveShardCollectionRegistry&) = delete; public: ActiveShardCollectionRegistry(); @@ -119,7 +119,8 @@ private: * registerShardCollection method for more details. */ class ScopedShardCollection { - MONGO_DISALLOW_COPYING(ScopedShardCollection); + ScopedShardCollection(const ScopedShardCollection&) = delete; + ScopedShardCollection& operator=(const ScopedShardCollection&) = delete; public: ScopedShardCollection(std::string nss, diff --git a/src/mongo/db/s/balancer/balancer.h b/src/mongo/db/s/balancer/balancer.h index 91a8e9280b6..2b6738def19 100644 --- a/src/mongo/db/s/balancer/balancer.h +++ b/src/mongo/db/s/balancer/balancer.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/s/balancer/balancer_chunk_selection_policy.h" #include "mongo/db/s/balancer/balancer_random.h" #include "mongo/db/s/balancer/migration_manager.h" @@ -55,7 +54,8 @@ class Status; * loaded shards. It would issue a request for a chunk migration per round, if it found so. */ class Balancer { - MONGO_DISALLOW_COPYING(Balancer); + Balancer(const Balancer&) = delete; + Balancer& operator=(const Balancer&) = delete; public: Balancer(ServiceContext* serviceContext); diff --git a/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h b/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h index eff68e36462..2557cebd602 100644 --- a/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h +++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h @@ -32,7 +32,6 @@ #include <boost/optional.hpp> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/db/s/balancer/balancer_policy.h" #include "mongo/s/catalog/type_chunk.h" #include "mongo/s/chunk_version.h" @@ -51,7 +50,8 @@ class StatusWith; * 'balanced' means. */ class BalancerChunkSelectionPolicy { - MONGO_DISALLOW_COPYING(BalancerChunkSelectionPolicy); + BalancerChunkSelectionPolicy(const BalancerChunkSelectionPolicy&) = delete; + BalancerChunkSelectionPolicy& operator=(const BalancerChunkSelectionPolicy&) = delete; public: /** diff --git a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp index 56dbb896b30..93fdf758f9c 100644 --- a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp @@ -117,7 +117,8 @@ StatusWith<DistributionStatus> createCollectionDistributionStatus( * splitting a chunk does not yield the same chunk anymore. */ class SplitCandidatesBuffer { - MONGO_DISALLOW_COPYING(SplitCandidatesBuffer); + SplitCandidatesBuffer(const SplitCandidatesBuffer&) = delete; + SplitCandidatesBuffer& operator=(const SplitCandidatesBuffer&) = delete; public: SplitCandidatesBuffer(NamespaceString nss, ChunkVersion collectionVersion) diff --git a/src/mongo/db/s/balancer/balancer_policy.h b/src/mongo/db/s/balancer/balancer_policy.h index dbeeb6d86cc..28592a34743 100644 --- a/src/mongo/db/s/balancer/balancer_policy.h +++ b/src/mongo/db/s/balancer/balancer_policy.h @@ -32,7 +32,6 @@ #include <set> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/bson/bsonobj.h" #include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/namespace_string.h" @@ -76,7 +75,8 @@ typedef std::map<ShardId, std::vector<ChunkType>> ShardToChunksMap; * query utilization statististics and to decide what to balance. */ class DistributionStatus { - MONGO_DISALLOW_COPYING(DistributionStatus); + DistributionStatus(const DistributionStatus&) = delete; + DistributionStatus& operator=(const DistributionStatus&) = delete; public: DistributionStatus(NamespaceString nss, ShardToChunksMap shardToChunksMap); diff --git a/src/mongo/db/s/balancer/cluster_statistics.h b/src/mongo/db/s/balancer/cluster_statistics.h index 4531d496403..32f6cb9f7c5 100644 --- a/src/mongo/db/s/balancer/cluster_statistics.h +++ b/src/mongo/db/s/balancer/cluster_statistics.h @@ -34,7 +34,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/s/client/shard.h" namespace mongo { @@ -50,7 +49,8 @@ class StatusWith; * the statistics collection. There should be one instance of this object per service context. */ class ClusterStatistics { - MONGO_DISALLOW_COPYING(ClusterStatistics); + ClusterStatistics(const ClusterStatistics&) = delete; + ClusterStatistics& operator=(const ClusterStatistics&) = delete; public: /** diff --git a/src/mongo/db/s/balancer/migration_manager.h b/src/mongo/db/s/balancer/migration_manager.h index 81adb434c33..4f6c1288571 100644 --- a/src/mongo/db/s/balancer/migration_manager.h +++ b/src/mongo/db/s/balancer/migration_manager.h @@ -33,7 +33,6 @@ #include <map> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/bson/bsonobj.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/balancer/balancer_policy.h" @@ -64,7 +63,8 @@ typedef std::map<MigrationIdentifier, Status> MigrationStatuses; * Manages and executes parallel migrations for the balancer. */ class MigrationManager { - MONGO_DISALLOW_COPYING(MigrationManager); + MigrationManager(const MigrationManager&) = delete; + MigrationManager& operator=(const MigrationManager&) = delete; public: MigrationManager(ServiceContext* serviceContext); diff --git a/src/mongo/db/s/balancer/scoped_migration_request.h b/src/mongo/db/s/balancer/scoped_migration_request.h index ecbb3f4c9ea..bfb58ba103c 100644 --- a/src/mongo/db/s/balancer/scoped_migration_request.h +++ b/src/mongo/db/s/balancer/scoped_migration_request.h @@ -46,7 +46,8 @@ namespace mongo { * This class should only be used by the Balancer! */ class ScopedMigrationRequest { - MONGO_DISALLOW_COPYING(ScopedMigrationRequest); + ScopedMigrationRequest(const ScopedMigrationRequest&) = delete; + ScopedMigrationRequest& operator=(const ScopedMigrationRequest&) = delete; public: /** diff --git a/src/mongo/db/s/catalog_cache_loader_mock.h b/src/mongo/db/s/catalog_cache_loader_mock.h index 9420e4daed6..a325a9574b9 100644 --- a/src/mongo/db/s/catalog_cache_loader_mock.h +++ b/src/mongo/db/s/catalog_cache_loader_mock.h @@ -39,7 +39,8 @@ namespace mongo { * facilitate testing of classes that use a CatalogCacheLoader. */ class CatalogCacheLoaderMock final : public CatalogCacheLoader { - MONGO_DISALLOW_COPYING(CatalogCacheLoaderMock); + CatalogCacheLoaderMock(const CatalogCacheLoaderMock&) = delete; + CatalogCacheLoaderMock& operator=(const CatalogCacheLoaderMock&) = delete; public: CatalogCacheLoaderMock(); diff --git a/src/mongo/db/s/chunk_split_state_driver.h b/src/mongo/db/s/chunk_split_state_driver.h index 711d35696e4..9c65bfb7cf3 100644 --- a/src/mongo/db/s/chunk_split_state_driver.h +++ b/src/mongo/db/s/chunk_split_state_driver.h @@ -33,7 +33,6 @@ #include <boost/optional.hpp> #include <memory> -#include "mongo/base/disallow_copying.h" #include "mongo/s/chunk_writes_tracker.h" @@ -47,7 +46,8 @@ namespace mongo { * the ChunkSplitter which will drive these state changes. */ class ChunkSplitStateDriver final { - MONGO_DISALLOW_COPYING(ChunkSplitStateDriver); + ChunkSplitStateDriver(const ChunkSplitStateDriver&) = delete; + ChunkSplitStateDriver& operator=(const ChunkSplitStateDriver&) = delete; public: /** diff --git a/src/mongo/db/s/chunk_splitter.h b/src/mongo/db/s/chunk_splitter.h index d942752f126..ef774dc017c 100644 --- a/src/mongo/db/s/chunk_splitter.h +++ b/src/mongo/db/s/chunk_splitter.h @@ -43,7 +43,8 @@ class ChunkSplitStateDriver; * Handles asynchronous auto-splitting of chunks. */ class ChunkSplitter { - MONGO_DISALLOW_COPYING(ChunkSplitter); + ChunkSplitter(const ChunkSplitter&) = delete; + ChunkSplitter& operator=(const ChunkSplitter&) = delete; public: ChunkSplitter(); diff --git a/src/mongo/db/s/collection_range_deleter.h b/src/mongo/db/s/collection_range_deleter.h index cbd67f3fa51..9a084fdcf35 100644 --- a/src/mongo/db/s/collection_range_deleter.h +++ b/src/mongo/db/s/collection_range_deleter.h @@ -30,7 +30,6 @@ #include <list> -#include "mongo/base/disallow_copying.h" #include "mongo/db/namespace_string.h" #include "mongo/executor/task_executor.h" #include "mongo/s/catalog/type_chunk.h" @@ -55,7 +54,8 @@ extern AtomicWord<int> rangeDeleterBatchSize; extern AtomicWord<int> rangeDeleterBatchDelayMS; class CollectionRangeDeleter { - MONGO_DISALLOW_COPYING(CollectionRangeDeleter); + CollectionRangeDeleter(const CollectionRangeDeleter&) = delete; + CollectionRangeDeleter& operator=(const CollectionRangeDeleter&) = delete; public: /** diff --git a/src/mongo/db/s/collection_sharding_runtime.h b/src/mongo/db/s/collection_sharding_runtime.h index 3c14a46db31..d2aefc10ff4 100644 --- a/src/mongo/db/s/collection_sharding_runtime.h +++ b/src/mongo/db/s/collection_sharding_runtime.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/collection_sharding_state.h" @@ -48,7 +47,8 @@ extern AtomicWord<int> migrationLockAcquisitionMaxWaitMS; */ class CollectionShardingRuntime final : public CollectionShardingState, public Decorable<CollectionShardingRuntime> { - MONGO_DISALLOW_COPYING(CollectionShardingRuntime); + CollectionShardingRuntime(const CollectionShardingRuntime&) = delete; + CollectionShardingRuntime& operator=(const CollectionShardingRuntime&) = delete; public: CollectionShardingRuntime(ServiceContext* sc, @@ -163,7 +163,8 @@ private: * RAII-style class, which obtains a reference to the critical section for the specified collection. */ class CollectionCriticalSection { - MONGO_DISALLOW_COPYING(CollectionCriticalSection); + CollectionCriticalSection(const CollectionCriticalSection&) = delete; + CollectionCriticalSection& operator=(const CollectionCriticalSection&) = delete; public: CollectionCriticalSection(OperationContext* opCtx, NamespaceString ns); diff --git a/src/mongo/db/s/collection_sharding_state.cpp b/src/mongo/db/s/collection_sharding_state.cpp index 1ce7bd0f7b2..7c572a029cd 100644 --- a/src/mongo/db/s/collection_sharding_state.cpp +++ b/src/mongo/db/s/collection_sharding_state.cpp @@ -44,7 +44,8 @@ namespace mongo { namespace { class CollectionShardingStateMap { - MONGO_DISALLOW_COPYING(CollectionShardingStateMap); + CollectionShardingStateMap(const CollectionShardingStateMap&) = delete; + CollectionShardingStateMap& operator=(const CollectionShardingStateMap&) = delete; public: static const ServiceContext::Decoration<boost::optional<CollectionShardingStateMap>> get; diff --git a/src/mongo/db/s/collection_sharding_state.h b/src/mongo/db/s/collection_sharding_state.h index 1f1a0c76e6f..9991a1811ab 100644 --- a/src/mongo/db/s/collection_sharding_state.h +++ b/src/mongo/db/s/collection_sharding_state.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/logical_time.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/scoped_collection_metadata.h" @@ -53,7 +52,8 @@ namespace mongo { * lock on the respective collection. */ class CollectionShardingState { - MONGO_DISALLOW_COPYING(CollectionShardingState); + CollectionShardingState(const CollectionShardingState&) = delete; + CollectionShardingState& operator=(const CollectionShardingState&) = delete; public: using CSRLock = ShardingStateLock<CollectionShardingState>; @@ -172,7 +172,8 @@ private: * which is running. */ class CollectionShardingStateFactory { - MONGO_DISALLOW_COPYING(CollectionShardingStateFactory); + CollectionShardingStateFactory(const CollectionShardingStateFactory&) = delete; + CollectionShardingStateFactory& operator=(const CollectionShardingStateFactory&) = delete; public: static void set(ServiceContext* service, diff --git a/src/mongo/db/s/config/namespace_serializer.h b/src/mongo/db/s/config/namespace_serializer.h index aecc08f9355..7b7832ebbe7 100644 --- a/src/mongo/db/s/config/namespace_serializer.h +++ b/src/mongo/db/s/config/namespace_serializer.h @@ -44,7 +44,8 @@ namespace mongo { class OperationContext; class NamespaceSerializer { - MONGO_DISALLOW_COPYING(NamespaceSerializer); + NamespaceSerializer(const NamespaceSerializer&) = delete; + NamespaceSerializer& operator=(const NamespaceSerializer&) = delete; public: class ScopedLock { diff --git a/src/mongo/db/s/config/sharding_catalog_manager.h b/src/mongo/db/s/config/sharding_catalog_manager.h index 071085395cc..f60833c490e 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager.h +++ b/src/mongo/db/s/config/sharding_catalog_manager.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/repl/optime_with.h" @@ -69,7 +68,8 @@ enum ShardDrainingStatus { * moved out of ShardingCatalogClient and into this class. */ class ShardingCatalogManager { - MONGO_DISALLOW_COPYING(ShardingCatalogManager); + ShardingCatalogManager(const ShardingCatalogManager&) = delete; + ShardingCatalogManager& operator=(const ShardingCatalogManager&) = delete; friend class ConfigSvrShardCollectionCommand; public: diff --git a/src/mongo/db/s/config_server_op_observer.h b/src/mongo/db/s/config_server_op_observer.h index 08e1dfd0cf4..bf804fbf6c4 100644 --- a/src/mongo/db/s/config_server_op_observer.h +++ b/src/mongo/db/s/config_server_op_observer.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/op_observer.h" namespace mongo { @@ -39,7 +38,8 @@ namespace mongo { * server (--configsvr). */ class ConfigServerOpObserver final : public OpObserver { - MONGO_DISALLOW_COPYING(ConfigServerOpObserver); + ConfigServerOpObserver(const ConfigServerOpObserver&) = delete; + ConfigServerOpObserver& operator=(const ConfigServerOpObserver&) = delete; public: ConfigServerOpObserver(); diff --git a/src/mongo/db/s/database_sharding_state.h b/src/mongo/db/s/database_sharding_state.h index 2cd7be76f04..a580e5bf4dc 100644 --- a/src/mongo/db/s/database_sharding_state.h +++ b/src/mongo/db/s/database_sharding_state.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/catalog/database.h" #include "mongo/db/s/sharding_migration_critical_section.h" #include "mongo/db/s/sharding_state_lock.h" @@ -44,7 +43,8 @@ class OperationContext; * Synchronizes access to this shard server's cached database version for Database. */ class DatabaseShardingState { - MONGO_DISALLOW_COPYING(DatabaseShardingState); + DatabaseShardingState(const DatabaseShardingState&) = delete; + DatabaseShardingState& operator=(const DatabaseShardingState&) = delete; public: /** diff --git a/src/mongo/db/s/metadata_manager.h b/src/mongo/db/s/metadata_manager.h index ca5e5f98048..9c7842386a1 100644 --- a/src/mongo/db/s/metadata_manager.h +++ b/src/mongo/db/s/metadata_manager.h @@ -31,7 +31,6 @@ #include <list> -#include "mongo/base/disallow_copying.h" #include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/logical_time.h" #include "mongo/db/namespace_string.h" @@ -50,7 +49,8 @@ namespace mongo { class RangePreserver; class MetadataManager { - MONGO_DISALLOW_COPYING(MetadataManager); + MetadataManager(const MetadataManager&) = delete; + MetadataManager& operator=(const MetadataManager&) = delete; public: using CleanupNotification = CollectionRangeDeleter::DeleteNotification; @@ -152,7 +152,8 @@ private: * point in time along with a counter of how many queries are still using it. */ struct CollectionMetadataTracker { - MONGO_DISALLOW_COPYING(CollectionMetadataTracker); + CollectionMetadataTracker(const CollectionMetadataTracker&) = delete; + CollectionMetadataTracker& operator=(const CollectionMetadataTracker&) = delete; CollectionMetadataTracker(CollectionMetadata inMetadata) : metadata(std::move(inMetadata)) {} diff --git a/src/mongo/db/s/migration_chunk_cloner_source.h b/src/mongo/db/s/migration_chunk_cloner_source.h index 3584c7f60f6..6a734595ba4 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source.h +++ b/src/mongo/db/s/migration_chunk_cloner_source.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/util/time_support.h" namespace mongo { @@ -58,7 +57,8 @@ class OpTime; * kicks off the cloning as soon as possible by calling startClone. */ class MigrationChunkClonerSource { - MONGO_DISALLOW_COPYING(MigrationChunkClonerSource); + MigrationChunkClonerSource(const MigrationChunkClonerSource&) = delete; + MigrationChunkClonerSource& operator=(const MigrationChunkClonerSource&) = delete; public: virtual ~MigrationChunkClonerSource(); diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.h b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h index aa8fda0530c..3874f03e76a 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.h +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h @@ -55,7 +55,8 @@ class Database; class RecordId; class MigrationChunkClonerSourceLegacy final : public MigrationChunkClonerSource { - MONGO_DISALLOW_COPYING(MigrationChunkClonerSourceLegacy); + MigrationChunkClonerSourceLegacy(const MigrationChunkClonerSourceLegacy&) = delete; + MigrationChunkClonerSourceLegacy& operator=(const MigrationChunkClonerSourceLegacy&) = delete; public: MigrationChunkClonerSourceLegacy(MoveChunkRequest request, diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp index 192551cc5e7..fed421be24d 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp @@ -57,7 +57,8 @@ namespace { * the session ids match. */ class AutoGetActiveCloner { - MONGO_DISALLOW_COPYING(AutoGetActiveCloner); + AutoGetActiveCloner(const AutoGetActiveCloner&) = delete; + AutoGetActiveCloner& operator=(const AutoGetActiveCloner&) = delete; public: AutoGetActiveCloner(OperationContext* opCtx, const MigrationSessionId& migrationSessionId) { diff --git a/src/mongo/db/s/migration_destination_manager.h b/src/mongo/db/s/migration_destination_manager.h index 655546c62bb..dcda2e37bee 100644 --- a/src/mongo/db/s/migration_destination_manager.h +++ b/src/mongo/db/s/migration_destination_manager.h @@ -31,7 +31,6 @@ #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/bson/bsonobj.h" #include "mongo/bson/bsonobjbuilder.h" @@ -64,7 +63,8 @@ class OpTime; * Drives the receiving side of the MongoD migration process. One instance exists per shard. */ class MigrationDestinationManager { - MONGO_DISALLOW_COPYING(MigrationDestinationManager); + MigrationDestinationManager(const MigrationDestinationManager&) = delete; + MigrationDestinationManager& operator=(const MigrationDestinationManager&) = delete; public: enum State { READY, CLONE, CATCHUP, STEADY, COMMIT_START, DONE, FAIL, ABORT }; diff --git a/src/mongo/db/s/migration_session_id.h b/src/mongo/db/s/migration_session_id.h index 91016f3c8aa..923427822de 100644 --- a/src/mongo/db/s/migration_session_id.h +++ b/src/mongo/db/s/migration_session_id.h @@ -32,7 +32,6 @@ #include <boost/optional.hpp> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" namespace mongo { diff --git a/src/mongo/db/s/migration_source_manager.h b/src/mongo/db/s/migration_source_manager.h index a01185f5269..b567b5ad7ce 100644 --- a/src/mongo/db/s/migration_source_manager.h +++ b/src/mongo/db/s/migration_source_manager.h @@ -31,7 +31,6 @@ #include <boost/optional.hpp> -#include "mongo/base/disallow_copying.h" #include "mongo/db/s/collection_sharding_runtime.h" #include "mongo/db/s/migration_chunk_cloner_source.h" #include "mongo/s/request_types/move_chunk_request.h" @@ -68,7 +67,8 @@ struct ShardingStatistics; * is the commitDonateChunk and its comments explain the reasoning. */ class MigrationSourceManager { - MONGO_DISALLOW_COPYING(MigrationSourceManager); + MigrationSourceManager(const MigrationSourceManager&) = delete; + MigrationSourceManager& operator=(const MigrationSourceManager&) = delete; public: /** diff --git a/src/mongo/db/s/move_primary_source_manager.h b/src/mongo/db/s/move_primary_source_manager.h index eba8d63172a..51c78b4f408 100644 --- a/src/mongo/db/s/move_primary_source_manager.h +++ b/src/mongo/db/s/move_primary_source_manager.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/s/database_sharding_state.h" #include "mongo/s/request_types/move_primary_gen.h" #include "mongo/s/shard_id.h" @@ -62,7 +61,8 @@ class Status; * which case the destructor will take care of clean up based on how far we have advanced. */ class MovePrimarySourceManager { - MONGO_DISALLOW_COPYING(MovePrimarySourceManager); + MovePrimarySourceManager(const MovePrimarySourceManager&) = delete; + MovePrimarySourceManager& operator=(const MovePrimarySourceManager&) = delete; public: /** diff --git a/src/mongo/db/s/namespace_metadata_change_notifications.h b/src/mongo/db/s/namespace_metadata_change_notifications.h index f97714135da..ba7c51e86a0 100644 --- a/src/mongo/db/s/namespace_metadata_change_notifications.h +++ b/src/mongo/db/s/namespace_metadata_change_notifications.h @@ -32,7 +32,6 @@ #include <list> #include <map> -#include "mongo/base/disallow_copying.h" #include "mongo/db/namespace_string.h" #include "mongo/stdx/mutex.h" #include "mongo/util/concurrency/notification.h" @@ -45,7 +44,9 @@ class OperationContext; * Map of one-snot notifications for changes to a particular namespace. */ class NamespaceMetadataChangeNotifications { - MONGO_DISALLOW_COPYING(NamespaceMetadataChangeNotifications); + NamespaceMetadataChangeNotifications(const NamespaceMetadataChangeNotifications&) = delete; + NamespaceMetadataChangeNotifications& operator=(const NamespaceMetadataChangeNotifications&) = + delete; struct NotificationToken; @@ -60,7 +61,8 @@ public: * out of scope, if it has not been signalled yet. */ class ScopedNotification { - MONGO_DISALLOW_COPYING(ScopedNotification); + ScopedNotification(const ScopedNotification&) = delete; + ScopedNotification& operator=(const ScopedNotification&) = delete; public: ScopedNotification(NamespaceMetadataChangeNotifications* notifications, diff --git a/src/mongo/db/s/operation_sharding_state.h b/src/mongo/db/s/operation_sharding_state.h index 4358d6c9a21..c24b451e274 100644 --- a/src/mongo/db/s/operation_sharding_state.h +++ b/src/mongo/db/s/operation_sharding_state.h @@ -31,7 +31,6 @@ #include <boost/optional.hpp> -#include "mongo/base/disallow_copying.h" #include "mongo/db/namespace_string.h" #include "mongo/s/chunk_version.h" #include "mongo/s/database_version_gen.h" @@ -51,7 +50,8 @@ class OperationContext; * Note: This only supports storing the version for a single namespace. */ class OperationShardingState { - MONGO_DISALLOW_COPYING(OperationShardingState); + OperationShardingState(const OperationShardingState&) = delete; + OperationShardingState& operator=(const OperationShardingState&) = delete; public: OperationShardingState(); diff --git a/src/mongo/db/s/periodic_balancer_config_refresher.h b/src/mongo/db/s/periodic_balancer_config_refresher.h index 5407dd6baf3..96a36202025 100644 --- a/src/mongo/db/s/periodic_balancer_config_refresher.h +++ b/src/mongo/db/s/periodic_balancer_config_refresher.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/util/periodic_runner.h" namespace mongo { @@ -38,7 +37,8 @@ class OperationContext; class ServiceContext; class PeriodicBalancerConfigRefresher final { - MONGO_DISALLOW_COPYING(PeriodicBalancerConfigRefresher); + PeriodicBalancerConfigRefresher(const PeriodicBalancerConfigRefresher&) = delete; + PeriodicBalancerConfigRefresher& operator=(const PeriodicBalancerConfigRefresher&) = delete; public: PeriodicBalancerConfigRefresher() = default; diff --git a/src/mongo/db/s/scoped_operation_completion_sharding_actions.h b/src/mongo/db/s/scoped_operation_completion_sharding_actions.h index 039274b399f..de61f5fbfd2 100644 --- a/src/mongo/db/s/scoped_operation_completion_sharding_actions.h +++ b/src/mongo/db/s/scoped_operation_completion_sharding_actions.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/util/polymorphic_scoped.h" namespace mongo { @@ -42,7 +41,10 @@ namespace mongo { class OperationContext; class ScopedOperationCompletionShardingActions : public PolymorphicScoped { - MONGO_DISALLOW_COPYING(ScopedOperationCompletionShardingActions); + ScopedOperationCompletionShardingActions(const ScopedOperationCompletionShardingActions&) = + delete; + ScopedOperationCompletionShardingActions& operator=( + const ScopedOperationCompletionShardingActions&) = delete; public: ScopedOperationCompletionShardingActions(OperationContext* opCtx); diff --git a/src/mongo/db/s/session_catalog_migration_destination.h b/src/mongo/db/s/session_catalog_migration_destination.h index 821e56bea8e..89c43be2e62 100644 --- a/src/mongo/db/s/session_catalog_migration_destination.h +++ b/src/mongo/db/s/session_catalog_migration_destination.h @@ -32,7 +32,6 @@ #include <memory> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/bson/bsonobj.h" #include "mongo/db/repl/oplog_entry.h" @@ -54,7 +53,9 @@ class OperationContext; * the source migration shard. */ class SessionCatalogMigrationDestination { - MONGO_DISALLOW_COPYING(SessionCatalogMigrationDestination); + SessionCatalogMigrationDestination(const SessionCatalogMigrationDestination&) = delete; + SessionCatalogMigrationDestination& operator=(const SessionCatalogMigrationDestination&) = + delete; public: enum class State { diff --git a/src/mongo/db/s/session_catalog_migration_source.h b/src/mongo/db/s/session_catalog_migration_source.h index b866e89e84a..c84bc5fb713 100644 --- a/src/mongo/db/s/session_catalog_migration_source.h +++ b/src/mongo/db/s/session_catalog_migration_source.h @@ -32,7 +32,6 @@ #include <boost/optional.hpp> #include <memory> -#include "mongo/base/disallow_copying.h" #include "mongo/client/dbclient_cursor.h" #include "mongo/db/namespace_string.h" #include "mongo/db/repl/optime.h" @@ -70,7 +69,8 @@ class ServiceContext; * it would be wrong to wait for the highest opTime in this case. */ class SessionCatalogMigrationSource { - MONGO_DISALLOW_COPYING(SessionCatalogMigrationSource); + SessionCatalogMigrationSource(const SessionCatalogMigrationSource&) = delete; + SessionCatalogMigrationSource& operator=(const SessionCatalogMigrationSource&) = delete; public: struct OplogResult { diff --git a/src/mongo/db/s/shard_identity_rollback_notifier.h b/src/mongo/db/s/shard_identity_rollback_notifier.h index b36109abbb0..7a5141f3fc8 100644 --- a/src/mongo/db/s/shard_identity_rollback_notifier.h +++ b/src/mongo/db/s/shard_identity_rollback_notifier.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" namespace mongo { @@ -52,7 +51,8 @@ class ServiceContext; * exiting rollback, and there can only be one of those things happening at any given time. */ class ShardIdentityRollbackNotifier { - MONGO_DISALLOW_COPYING(ShardIdentityRollbackNotifier); + ShardIdentityRollbackNotifier(const ShardIdentityRollbackNotifier&) = delete; + ShardIdentityRollbackNotifier& operator=(const ShardIdentityRollbackNotifier&) = delete; public: ShardIdentityRollbackNotifier(); diff --git a/src/mongo/db/s/shard_server_catalog_cache_loader.h b/src/mongo/db/s/shard_server_catalog_cache_loader.h index c578217a3d5..9e998415793 100644 --- a/src/mongo/db/s/shard_server_catalog_cache_loader.h +++ b/src/mongo/db/s/shard_server_catalog_cache_loader.h @@ -46,7 +46,8 @@ namespace mongo { * retrieves chunk metadata from the shard persisted chunk metadata. */ class ShardServerCatalogCacheLoader : public CatalogCacheLoader { - MONGO_DISALLOW_COPYING(ShardServerCatalogCacheLoader); + ShardServerCatalogCacheLoader(const ShardServerCatalogCacheLoader&) = delete; + ShardServerCatalogCacheLoader& operator=(const ShardServerCatalogCacheLoader&) = delete; public: ShardServerCatalogCacheLoader(std::unique_ptr<CatalogCacheLoader> configServerLoader); @@ -98,7 +99,8 @@ private: * metadata for a specific collection. */ struct collAndChunkTask { - MONGO_DISALLOW_COPYING(collAndChunkTask); + collAndChunkTask(const collAndChunkTask&) = delete; + collAndChunkTask& operator=(const collAndChunkTask&) = delete; collAndChunkTask(collAndChunkTask&&) = default; /** @@ -234,7 +236,8 @@ private: * metadata for a specific database. */ struct DBTask { - MONGO_DISALLOW_COPYING(DBTask); + DBTask(const DBTask&) = delete; + DBTask& operator=(const DBTask&) = delete; DBTask(DBTask&&) = default; /** diff --git a/src/mongo/db/s/shard_server_op_observer.h b/src/mongo/db/s/shard_server_op_observer.h index e39089dbb32..339f5968bf8 100644 --- a/src/mongo/db/s/shard_server_op_observer.h +++ b/src/mongo/db/s/shard_server_op_observer.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/op_observer.h" #include "mongo/db/s/collection_sharding_runtime.h" @@ -40,7 +39,8 @@ namespace mongo { * server (--shardsvr). */ class ShardServerOpObserver final : public OpObserver { - MONGO_DISALLOW_COPYING(ShardServerOpObserver); + ShardServerOpObserver(const ShardServerOpObserver&) = delete; + ShardServerOpObserver& operator=(const ShardServerOpObserver&) = delete; public: ShardServerOpObserver(); diff --git a/src/mongo/db/s/sharded_connection_info.h b/src/mongo/db/s/sharded_connection_info.h index 1587f0be81b..e96cf41e49b 100644 --- a/src/mongo/db/s/sharded_connection_info.h +++ b/src/mongo/db/s/sharded_connection_info.h @@ -33,7 +33,6 @@ #include <map> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/s/chunk_version.h" namespace mongo { @@ -45,7 +44,8 @@ class Client; * namespace. */ class ShardedConnectionInfo { - MONGO_DISALLOW_COPYING(ShardedConnectionInfo); + ShardedConnectionInfo(const ShardedConnectionInfo&) = delete; + ShardedConnectionInfo& operator=(const ShardedConnectionInfo&) = delete; public: ShardedConnectionInfo(); diff --git a/src/mongo/db/s/sharding_initialization_mongod.h b/src/mongo/db/s/sharding_initialization_mongod.h index 4c01387cf16..e26302b4bb2 100644 --- a/src/mongo/db/s/sharding_initialization_mongod.h +++ b/src/mongo/db/s/sharding_initialization_mongod.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/db/s/sharding_state.h" #include "mongo/db/s/type_shard_identity.h" @@ -48,7 +47,8 @@ class ServiceContext; * ShardingState in the initialized state. */ class ShardingInitializationMongoD { - MONGO_DISALLOW_COPYING(ShardingInitializationMongoD); + ShardingInitializationMongoD(const ShardingInitializationMongoD&) = delete; + ShardingInitializationMongoD& operator=(const ShardingInitializationMongoD&) = delete; public: using ShardingEnvironmentInitFunc = stdx::function<void( diff --git a/src/mongo/db/s/sharding_migration_critical_section.h b/src/mongo/db/s/sharding_migration_critical_section.h index 2ab81097ee6..0dbc8fd4df4 100644 --- a/src/mongo/db/s/sharding_migration_critical_section.h +++ b/src/mongo/db/s/sharding_migration_critical_section.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/util/concurrency/notification.h" namespace mongo { @@ -44,7 +43,8 @@ namespace mongo { * transferred to the recipient shard. Databases effectively only support the commit phase. */ class ShardingMigrationCriticalSection { - MONGO_DISALLOW_COPYING(ShardingMigrationCriticalSection); + ShardingMigrationCriticalSection(const ShardingMigrationCriticalSection&) = delete; + ShardingMigrationCriticalSection& operator=(const ShardingMigrationCriticalSection&) = delete; public: ShardingMigrationCriticalSection(); diff --git a/src/mongo/db/s/sharding_state.h b/src/mongo/db/s/sharding_state.h index 1755d33293e..4b78d0bdfb4 100644 --- a/src/mongo/db/s/sharding_state.h +++ b/src/mongo/db/s/sharding_state.h @@ -31,7 +31,6 @@ #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/bson/oid.h" #include "mongo/s/shard_id.h" #include "mongo/stdx/mutex.h" @@ -50,7 +49,8 @@ class ServiceContext; * never gets destroyed or uninitialized. */ class ShardingState { - MONGO_DISALLOW_COPYING(ShardingState); + ShardingState(const ShardingState&) = delete; + ShardingState& operator=(const ShardingState&) = delete; public: ShardingState(); diff --git a/src/mongo/db/s/sharding_state_lock.h b/src/mongo/db/s/sharding_state_lock.h index fc0bae7c4c1..620cd5f53a0 100644 --- a/src/mongo/db/s/sharding_state_lock.h +++ b/src/mongo/db/s/sharding_state_lock.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/stdx/variant.h" diff --git a/src/mongo/db/s/transaction_coordinator.h b/src/mongo/db/s/transaction_coordinator.h index d47a39b9a88..a6bd7642d10 100644 --- a/src/mongo/db/s/transaction_coordinator.h +++ b/src/mongo/db/s/transaction_coordinator.h @@ -45,7 +45,8 @@ namespace mongo { * `onCompletion()`. */ class TransactionCoordinator { - MONGO_DISALLOW_COPYING(TransactionCoordinator); + TransactionCoordinator(const TransactionCoordinator&) = delete; + TransactionCoordinator& operator=(const TransactionCoordinator&) = delete; public: /** diff --git a/src/mongo/db/s/transaction_coordinator_catalog.h b/src/mongo/db/s/transaction_coordinator_catalog.h index 1605dbe8869..bc57f65e633 100644 --- a/src/mongo/db/s/transaction_coordinator_catalog.h +++ b/src/mongo/db/s/transaction_coordinator_catalog.h @@ -32,7 +32,6 @@ #include <boost/optional.hpp> #include <map> -#include "mongo/base/disallow_copying.h" #include "mongo/db/s/transaction_coordinator.h" #include "mongo/stdx/condition_variable.h" #include "mongo/util/concurrency/with_lock.h" @@ -44,7 +43,8 @@ namespace mongo { * txnNumber. It supports holding several coordinator objects per session. */ class TransactionCoordinatorCatalog { - MONGO_DISALLOW_COPYING(TransactionCoordinatorCatalog); + TransactionCoordinatorCatalog(const TransactionCoordinatorCatalog&) = delete; + TransactionCoordinatorCatalog& operator=(const TransactionCoordinatorCatalog&) = delete; public: TransactionCoordinatorCatalog(); diff --git a/src/mongo/db/s/transaction_coordinator_driver.h b/src/mongo/db/s/transaction_coordinator_driver.h index bc9bbb825af..d4833562a2c 100644 --- a/src/mongo/db/s/transaction_coordinator_driver.h +++ b/src/mongo/db/s/transaction_coordinator_driver.h @@ -88,7 +88,8 @@ struct PrepareVoteConsensus { * no other operations are allowed until any returned futures are signalled. */ class TransactionCoordinatorDriver { - MONGO_DISALLOW_COPYING(TransactionCoordinatorDriver); + TransactionCoordinatorDriver(const TransactionCoordinatorDriver&) = delete; + TransactionCoordinatorDriver& operator=(const TransactionCoordinatorDriver&) = delete; public: TransactionCoordinatorDriver(ServiceContext* serviceContext, diff --git a/src/mongo/db/s/transaction_coordinator_service.h b/src/mongo/db/s/transaction_coordinator_service.h index 9cfdc68faab..8dfa59213e7 100644 --- a/src/mongo/db/s/transaction_coordinator_service.h +++ b/src/mongo/db/s/transaction_coordinator_service.h @@ -29,13 +29,13 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/s/transaction_coordinator_catalog.h" namespace mongo { class TransactionCoordinatorService { - MONGO_DISALLOW_COPYING(TransactionCoordinatorService); + TransactionCoordinatorService(const TransactionCoordinatorService&) = delete; + TransactionCoordinatorService& operator=(const TransactionCoordinatorService&) = delete; public: TransactionCoordinatorService(); diff --git a/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp b/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp index 06f8b8fa0c4..1ff67ff3257 100644 --- a/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp +++ b/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp @@ -39,7 +39,8 @@ namespace mongo { namespace { class WaitForOngoingChunksSplitsCommand final : public BasicCommand { - MONGO_DISALLOW_COPYING(WaitForOngoingChunksSplitsCommand); + WaitForOngoingChunksSplitsCommand(const WaitForOngoingChunksSplitsCommand&) = delete; + WaitForOngoingChunksSplitsCommand& operator=(const WaitForOngoingChunksSplitsCommand&) = delete; public: WaitForOngoingChunksSplitsCommand() : BasicCommand("waitForOngoingChunkSplits") {} |