diff options
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/apply_ops.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/bgsync.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/collection_cloner.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/repl/database_cloner.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/do_txn.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/initial_syncer.cpp | 12 | ||||
-rw-r--r-- | src/mongo/db/repl/initial_syncer.h | 8 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog_fetcher.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog_fetcher.h | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/repl_set_commands.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_info.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/roll_back_local_operations.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/roll_back_local_operations.h | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/sync_tail.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/topology_coordinator.cpp | 4 |
19 files changed, 37 insertions, 37 deletions
diff --git a/src/mongo/db/repl/apply_ops.cpp b/src/mongo/db/repl/apply_ops.cpp index e73efba3d41..698b67f4c17 100644 --- a/src/mongo/db/repl/apply_ops.cpp +++ b/src/mongo/db/repl/apply_ops.cpp @@ -63,7 +63,7 @@ constexpr StringData ApplyOps::kOplogApplicationModeFieldName; namespace { // If enabled, causes loop in _applyOps() to hang after applying current operation. -MONGO_FP_DECLARE(applyOpsPauseBetweenOperations); +MONGO_FAIL_POINT_DEFINE(applyOpsPauseBetweenOperations); /** * Return true iff the applyOpsCmd can be executed in a single WriteUnitOfWork. diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp index 7e5ff744acc..f979975ec55 100644 --- a/src/mongo/db/repl/bgsync.cpp +++ b/src/mongo/db/repl/bgsync.cpp @@ -141,7 +141,7 @@ size_t getSize(const BSONObj& o) { } // namespace // Failpoint which causes rollback to hang before starting. -MONGO_FP_DECLARE(rollbackHangBeforeStart); +MONGO_FAIL_POINT_DEFINE(rollbackHangBeforeStart); // The count of items in the buffer static Counter64 bufferCountGauge; diff --git a/src/mongo/db/repl/collection_cloner.cpp b/src/mongo/db/repl/collection_cloner.cpp index 553cc1d20bf..57c3b876fff 100644 --- a/src/mongo/db/repl/collection_cloner.cpp +++ b/src/mongo/db/repl/collection_cloner.cpp @@ -72,19 +72,19 @@ MONGO_EXPORT_SERVER_PARAMETER(numInitialSyncCollectionFindAttempts, int, 3); // Failpoint which causes initial sync to hang before establishing its cursor to clone the // 'namespace' collection. -MONGO_FP_DECLARE(initialSyncHangBeforeCollectionClone); +MONGO_FAIL_POINT_DEFINE(initialSyncHangBeforeCollectionClone); // Failpoint which causes initial sync to hang when it has cloned 'numDocsToClone' documents to // collection 'namespace'. -MONGO_FP_DECLARE(initialSyncHangDuringCollectionClone); +MONGO_FAIL_POINT_DEFINE(initialSyncHangDuringCollectionClone); // Failpoint which causes initial sync to hang after handling the next batch of results from the // 'AsyncResultsMerger', optionally limited to a specific collection. -MONGO_FP_DECLARE(initialSyncHangCollectionClonerAfterHandlingBatchResponse); +MONGO_FAIL_POINT_DEFINE(initialSyncHangCollectionClonerAfterHandlingBatchResponse); // Failpoint which causes initial sync to hang before establishing the cursors (but after // listIndexes), optionally limited to a specific collection. -MONGO_FP_DECLARE(initialSyncHangCollectionClonerBeforeEstablishingCursor); +MONGO_FAIL_POINT_DEFINE(initialSyncHangCollectionClonerBeforeEstablishingCursor); BSONObj makeCommandWithUUIDorCollectionName(StringData command, OptionalCollectionUUID uuid, diff --git a/src/mongo/db/repl/database_cloner.cpp b/src/mongo/db/repl/database_cloner.cpp index 74da2fe22be..e2f7d4aa432 100644 --- a/src/mongo/db/repl/database_cloner.cpp +++ b/src/mongo/db/repl/database_cloner.cpp @@ -52,7 +52,7 @@ namespace mongo { namespace repl { // Failpoint which causes the initial sync function to hang before running listCollections. -MONGO_FP_DECLARE(initialSyncHangBeforeListCollections); +MONGO_FAIL_POINT_DEFINE(initialSyncHangBeforeListCollections); namespace { @@ -77,7 +77,7 @@ MONGO_EXPORT_SERVER_PARAMETER(maxNumInitialSyncCollectionClonerCursors, int, 1); // Failpoint which causes initial sync to hang right after listCollections, but before cloning // any colelctions in the 'database' database. -MONGO_FP_DECLARE(initialSyncHangAfterListCollections); +MONGO_FAIL_POINT_DEFINE(initialSyncHangAfterListCollections); /** * Default listCollections predicate. diff --git a/src/mongo/db/repl/do_txn.cpp b/src/mongo/db/repl/do_txn.cpp index 5579ceb1c33..33d306d5fce 100644 --- a/src/mongo/db/repl/do_txn.cpp +++ b/src/mongo/db/repl/do_txn.cpp @@ -62,7 +62,7 @@ constexpr StringData DoTxn::kPreconditionFieldName; namespace { // If enabled, causes loop in _doTxn() to hang after applying current operation. -MONGO_FP_DECLARE(doTxnPauseBetweenOperations); +MONGO_FAIL_POINT_DEFINE(doTxnPauseBetweenOperations); /** * Return true iff the doTxnCmd can be executed in a single WriteUnitOfWork. diff --git a/src/mongo/db/repl/initial_syncer.cpp b/src/mongo/db/repl/initial_syncer.cpp index f49670a0927..aeb4659fddc 100644 --- a/src/mongo/db/repl/initial_syncer.cpp +++ b/src/mongo/db/repl/initial_syncer.cpp @@ -73,23 +73,23 @@ namespace mongo { namespace repl { // Failpoint for initial sync -MONGO_FP_DECLARE(failInitialSyncWithBadHost); +MONGO_FAIL_POINT_DEFINE(failInitialSyncWithBadHost); // Failpoint which fails initial sync and leaves an oplog entry in the buffer. -MONGO_FP_DECLARE(failInitSyncWithBufferedEntriesLeft); +MONGO_FAIL_POINT_DEFINE(failInitSyncWithBufferedEntriesLeft); // Failpoint which causes the initial sync function to hang before copying databases. -MONGO_FP_DECLARE(initialSyncHangBeforeCopyingDatabases); +MONGO_FAIL_POINT_DEFINE(initialSyncHangBeforeCopyingDatabases); // Failpoint which causes the initial sync function to hang before finishing. -MONGO_FP_DECLARE(initialSyncHangBeforeFinish); +MONGO_FAIL_POINT_DEFINE(initialSyncHangBeforeFinish); // Failpoint which causes the initial sync function to hang before calling shouldRetry on a failed // operation. -MONGO_FP_DECLARE(initialSyncHangBeforeGettingMissingDocument); +MONGO_FAIL_POINT_DEFINE(initialSyncHangBeforeGettingMissingDocument); // Failpoint which stops the applier. -MONGO_FP_DECLARE(rsSyncApplyStop); +MONGO_FAIL_POINT_DEFINE(rsSyncApplyStop); namespace { using namespace executor; diff --git a/src/mongo/db/repl/initial_syncer.h b/src/mongo/db/repl/initial_syncer.h index 063900142c9..7f0e5112857 100644 --- a/src/mongo/db/repl/initial_syncer.h +++ b/src/mongo/db/repl/initial_syncer.h @@ -59,17 +59,17 @@ namespace repl { // TODO: Remove forward declares once we remove rs_initialsync.cpp and other dependents. // Failpoint which fails initial sync and leaves an oplog entry in the buffer. -MONGO_FP_FORWARD_DECLARE(failInitSyncWithBufferedEntriesLeft); +MONGO_FAIL_POINT_DECLARE(failInitSyncWithBufferedEntriesLeft); // Failpoint which causes the initial sync function to hang before copying databases. -MONGO_FP_FORWARD_DECLARE(initialSyncHangBeforeCopyingDatabases); +MONGO_FAIL_POINT_DECLARE(initialSyncHangBeforeCopyingDatabases); // Failpoint which causes the initial sync function to hang before calling shouldRetry on a failed // operation. -MONGO_FP_FORWARD_DECLARE(initialSyncHangBeforeGettingMissingDocument); +MONGO_FAIL_POINT_DECLARE(initialSyncHangBeforeGettingMissingDocument); // Failpoint which stops the applier. -MONGO_FP_FORWARD_DECLARE(rsSyncApplyStop); +MONGO_FAIL_POINT_DECLARE(rsSyncApplyStop); struct InitialSyncState; struct MemberState; diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 930a17df044..ff2f07f9d99 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -112,7 +112,7 @@ using IndexVersion = IndexDescriptor::IndexVersion; namespace repl { namespace { -MONGO_FP_DECLARE(sleepBetweenInsertOpTimeGenerationAndLogOp); +MONGO_FAIL_POINT_DEFINE(sleepBetweenInsertOpTimeGenerationAndLogOp); /** * The `_localOplogCollection` pointer is always valid (or null) because an diff --git a/src/mongo/db/repl/oplog_fetcher.cpp b/src/mongo/db/repl/oplog_fetcher.cpp index 960b8c6df75..31c0eef2ff1 100644 --- a/src/mongo/db/repl/oplog_fetcher.cpp +++ b/src/mongo/db/repl/oplog_fetcher.cpp @@ -48,7 +48,7 @@ namespace repl { Seconds OplogFetcher::kDefaultProtocolZeroAwaitDataTimeout(2); -MONGO_FP_DECLARE(stopReplProducer); +MONGO_FAIL_POINT_DEFINE(stopReplProducer); namespace { diff --git a/src/mongo/db/repl/oplog_fetcher.h b/src/mongo/db/repl/oplog_fetcher.h index b23d8023cfc..8aab9ce6a53 100644 --- a/src/mongo/db/repl/oplog_fetcher.h +++ b/src/mongo/db/repl/oplog_fetcher.h @@ -44,7 +44,7 @@ namespace mongo { namespace repl { -MONGO_FP_FORWARD_DECLARE(stopReplProducer); +MONGO_FAIL_POINT_DECLARE(stopReplProducer); /** * The oplog fetcher, once started, reads operations from a remote oplog using a tailable cursor. diff --git a/src/mongo/db/repl/repl_set_commands.cpp b/src/mongo/db/repl/repl_set_commands.cpp index 5a7a8ddaab6..6b2877cacb7 100644 --- a/src/mongo/db/repl/repl_set_commands.cpp +++ b/src/mongo/db/repl/repl_set_commands.cpp @@ -649,7 +649,7 @@ bool isHeartbeatRequestV1(const BSONObj& cmdObj) { } // namespace -MONGO_FP_DECLARE(rsDelayHeartbeatResponse); +MONGO_FAIL_POINT_DEFINE(rsDelayHeartbeatResponse); /* { replSetHeartbeat : <setname> } */ class CmdReplSetHeartbeat : public ReplSetCommand { diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index 280aa6ff1ce..2c4d7aa65b1 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -119,7 +119,7 @@ const char meCollectionName[] = "local.me"; const auto meDatabaseName = localDbName; const char tsFieldName[] = "ts"; -MONGO_FP_DECLARE(dropPendingCollectionReaperHang); +MONGO_FAIL_POINT_DEFINE(dropPendingCollectionReaperHang); // Set this to specify maximum number of times the oplog fetcher will consecutively restart the // oplog tailing query on non-cancellation errors. diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index da02dfb3308..64e05ec1eec 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -89,8 +89,8 @@ namespace mongo { namespace repl { -MONGO_FP_DECLARE(stepdownHangBeforePerformingPostMemberStateUpdateActions); -MONGO_FP_DECLARE(transitionToPrimaryHangBeforeTakingGlobalExclusiveLock); +MONGO_FAIL_POINT_DEFINE(stepdownHangBeforePerformingPostMemberStateUpdateActions); +MONGO_FAIL_POINT_DEFINE(transitionToPrimaryHangBeforeTakingGlobalExclusiveLock); using CallbackArgs = executor::TaskExecutor::CallbackArgs; using CallbackFn = executor::TaskExecutor::CallbackFn; @@ -3418,7 +3418,7 @@ size_t ReplicationCoordinatorImpl::getNumUncommittedSnapshots() { return _uncommittedSnapshotsSize.load(); } -MONGO_FP_DECLARE(disableSnapshotting); +MONGO_FAIL_POINT_DEFINE(disableSnapshotting); bool ReplicationCoordinatorImpl::_updateCommittedSnapshot_inlock( const OpTime& newCommittedSnapshot) { diff --git a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp index 13f1cbb100b..7ef149b7224 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp @@ -65,8 +65,8 @@ namespace repl { namespace { -MONGO_FP_DECLARE(blockHeartbeatStepdown); -MONGO_FP_DECLARE(blockHeartbeatReconfigFinish); +MONGO_FAIL_POINT_DEFINE(blockHeartbeatStepdown); +MONGO_FAIL_POINT_DEFINE(blockHeartbeatReconfigFinish); } // namespace diff --git a/src/mongo/db/repl/replication_info.cpp b/src/mongo/db/repl/replication_info.cpp index 0b4ea7df501..ca56b594432 100644 --- a/src/mongo/db/repl/replication_info.cpp +++ b/src/mongo/db/repl/replication_info.cpp @@ -71,7 +71,7 @@ namespace repl { namespace { -MONGO_FP_DECLARE(impersonateFullyUpgradedFutureVersion); +MONGO_FAIL_POINT_DEFINE(impersonateFullyUpgradedFutureVersion); } // namespace diff --git a/src/mongo/db/repl/roll_back_local_operations.cpp b/src/mongo/db/repl/roll_back_local_operations.cpp index 0c29159b3bd..3e734dffe9b 100644 --- a/src/mongo/db/repl/roll_back_local_operations.cpp +++ b/src/mongo/db/repl/roll_back_local_operations.cpp @@ -44,10 +44,10 @@ namespace repl { // functionality for rs_rollback_no_uuid.cpp. See SERVER-29766. // Failpoint which causes rollback to hang before finishing. -MONGO_FP_DECLARE(rollbackHangBeforeFinish); +MONGO_FAIL_POINT_DEFINE(rollbackHangBeforeFinish); // Failpoint which causes rollback to hang and then fail after minValid is written. -MONGO_FP_DECLARE(rollbackHangThenFailAfterWritingMinValid); +MONGO_FAIL_POINT_DEFINE(rollbackHangThenFailAfterWritingMinValid); namespace { diff --git a/src/mongo/db/repl/roll_back_local_operations.h b/src/mongo/db/repl/roll_back_local_operations.h index 69e88e5091e..324296a3013 100644 --- a/src/mongo/db/repl/roll_back_local_operations.h +++ b/src/mongo/db/repl/roll_back_local_operations.h @@ -47,8 +47,8 @@ namespace repl { // two separate files, rs_rollback and rs_rollback_no_uuid. However, after // MongoDB 3.8 is released, we no longer need to maintain rs_rollback_no_uuid // code and these forward declares can be removed. See SERVER-29766. -MONGO_FP_FORWARD_DECLARE(rollbackHangBeforeFinish); -MONGO_FP_FORWARD_DECLARE(rollbackHangThenFailAfterWritingMinValid); +MONGO_FAIL_POINT_DECLARE(rollbackHangBeforeFinish); +MONGO_FAIL_POINT_DECLARE(rollbackHangThenFailAfterWritingMinValid); class RollBackLocalOperations { MONGO_DISALLOW_COPYING(RollBackLocalOperations); diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp index 9a5090ad5d1..f519801de3c 100644 --- a/src/mongo/db/repl/sync_tail.cpp +++ b/src/mongo/db/repl/sync_tail.cpp @@ -91,7 +91,7 @@ AtomicInt32 SyncTail::replBatchLimitOperations{50 * 1000}; namespace { -MONGO_FP_DECLARE(pauseBatchApplicationBeforeCompletion); +MONGO_FAIL_POINT_DEFINE(pauseBatchApplicationBeforeCompletion); /** * This variable determines the number of writer threads SyncTail will have. It can be overridden diff --git a/src/mongo/db/repl/topology_coordinator.cpp b/src/mongo/db/repl/topology_coordinator.cpp index f5898afeea8..eb9d23437f2 100644 --- a/src/mongo/db/repl/topology_coordinator.cpp +++ b/src/mongo/db/repl/topology_coordinator.cpp @@ -63,7 +63,7 @@ namespace mongo { namespace repl { -MONGO_FP_DECLARE(forceSyncSourceCandidate); +MONGO_FAIL_POINT_DEFINE(forceSyncSourceCandidate); const Seconds TopologyCoordinator::VoteLease::leaseTime = Seconds(30); @@ -74,7 +74,7 @@ MONGO_EXPORT_STARTUP_SERVER_PARAMETER(priorityTakeoverFreshnessWindowSeconds, in // If this fail point is enabled, TopologyCoordinator::shouldChangeSyncSource() will ignore // the option TopologyCoordinator::Options::maxSyncSourceLagSecs. The sync source will not be // re-evaluated if it lags behind another node by more than 'maxSyncSourceLagSecs' seconds. -MONGO_FP_DECLARE(disableMaxSyncSourceLagSecs); +MONGO_FAIL_POINT_DEFINE(disableMaxSyncSourceLagSecs); constexpr Milliseconds TopologyCoordinator::PingStats::UninitializedPingTime; |