0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-21 12:39:08 +01:00

SERVER-94852: Remove unused failpoints from replication code (#27134)

GitOrigin-RevId: 2a1add2c536dbcd1f94b5ef28b2129f4cc85946b
This commit is contained in:
seanzimm 2024-09-16 17:11:08 -04:00 committed by MongoDB Bot
parent 250bbd8ba3
commit eba18fa8eb
4 changed files with 0 additions and 25 deletions

View File

@ -110,9 +110,6 @@ namespace repl {
// Failpoint for initial sync
MONGO_FAIL_POINT_DEFINE(failInitialSyncWithBadHost);
// Failpoint which fails initial sync and leaves an oplog entry in the buffer.
MONGO_FAIL_POINT_DEFINE(failInitSyncWithBufferedEntriesLeft);
// Failpoint which causes the initial sync function to hang after getting the oldest active
// transaction timestamp from the sync source.
MONGO_FAIL_POINT_DEFINE(initialSyncHangAfterGettingBeginFetchingTimestamp);
@ -145,9 +142,6 @@ MONGO_FAIL_POINT_DEFINE(failAndHangInitialSync);
// Failpoint which fails initial sync before it applies the next batch of oplog entries.
MONGO_FAIL_POINT_DEFINE(failInitialSyncBeforeApplyingBatch);
// Failpoint which fasserts if applying a batch fails.
MONGO_FAIL_POINT_DEFINE(initialSyncFassertIfApplyingBatchFails);
// Failpoint which causes the initial sync function to hang before stopping the oplog fetcher.
MONGO_FAIL_POINT_DEFINE(initialSyncHangBeforeCompletingOplogFetching);
@ -1626,13 +1620,6 @@ void InitialSyncer::_multiApplierCallback(const Status& multiApplierStatus,
auto status =
_checkForShutdownAndConvertStatus_inlock(multiApplierStatus, "error applying batch");
// Set to cause initial sync to fassert instead of restart if applying a batch fails, so that
// tests can be robust to network errors but not oplog idempotency errors.
if (MONGO_unlikely(initialSyncFassertIfApplyingBatchFails.shouldFail())) {
LOGV2(21189, "initialSyncFassertIfApplyingBatchFails fail point enabled");
fassert(31210, status);
}
if (!status.isOK()) {
LOGV2_ERROR(21199, "Failed to apply batch", "error"_attr = redact(status));
onCompletionGuard->setResultAndCancelRemainingWork_inlock(lock, status);

View File

@ -79,10 +79,6 @@
namespace mongo {
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.
extern FailPoint failInitSyncWithBufferedEntriesLeft;
// Failpoint which causes the initial sync function to hang before copying databases.
extern FailPoint initialSyncHangBeforeCopyingDatabases;

View File

@ -173,9 +173,6 @@ using IndexVersion = IndexDescriptor::IndexVersion;
namespace repl {
namespace {
// Failpoint to block after a write and its oplog entry have been written to the storage engine and
// are visible, but before we have advanced 'lastApplied' for the write.
MONGO_FAIL_POINT_DEFINE(hangBeforeLogOpAdvancesLastApplied);
// Failpoint to block oplog application after receiving an IndexBuildAlreadyInProgress error.
MONGO_FAIL_POINT_DEFINE(hangAfterIndexBuildConflict);

View File

@ -783,8 +783,6 @@ bool replHasDatabases(OperationContext* opCtx) {
} // namespace
MONGO_FAIL_POINT_DEFINE(rsDelayHeartbeatResponse);
/* { replSetHeartbeat : <setname> } */
class CmdReplSetHeartbeat : public ReplSetCommand {
public:
@ -793,9 +791,6 @@ public:
const DatabaseName&,
const BSONObj& cmdObj,
BSONObjBuilder& result) override {
rsDelayHeartbeatResponse.execute(
[&](const BSONObj& data) { sleepsecs(data["delay"].numberInt()); });
LOGV2_FOR_HEARTBEATS(24095,
2,
"Received heartbeat request",