summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/oplog.h')
-rw-r--r--src/mongo/db/repl/oplog.h32
1 files changed, 2 insertions, 30 deletions
diff --git a/src/mongo/db/repl/oplog.h b/src/mongo/db/repl/oplog.h
index 3df367954b0..c3c9c2de13a 100644
--- a/src/mongo/db/repl/oplog.h
+++ b/src/mongo/db/repl/oplog.h
@@ -38,7 +38,6 @@
#include "mongo/bson/timestamp.h"
#include "mongo/db/catalog/collection_options.h"
#include "mongo/db/logical_session_id.h"
-#include "mongo/db/repl/oplog_constraint_violation_logger.h"
#include "mongo/db/repl/oplog_entry.h"
#include "mongo/db/repl/oplog_entry_or_grouped_inserts.h"
#include "mongo/db/repl/optime.h"
@@ -172,10 +171,7 @@ using IncrementOpsAppliedStatsFn = std::function<void()>;
class OplogApplication {
public:
static constexpr StringData kInitialSyncOplogApplicationMode = "InitialSync"_sd;
- // This only being used in 'applyOps' command when sent by client.
static constexpr StringData kRecoveringOplogApplicationMode = "Recovering"_sd;
- static constexpr StringData kStableRecoveringOplogApplicationMode = "StableRecovering"_sd;
- static constexpr StringData kUnstableRecoveringOplogApplicationMode = "UnstableRecovering"_sd;
static constexpr StringData kSecondaryOplogApplicationMode = "Secondary"_sd;
static constexpr StringData kApplyOpsCmdOplogApplicationMode = "ApplyOps"_sd;
@@ -184,12 +180,9 @@ public:
kInitialSync,
// Used when we are applying oplog operations to recover the database state following an
- // clean/unclean shutdown, or when we are recovering from the oplog after we rollback to a
+ // unclean shutdown, or when we are recovering from the oplog after we rollback to a
// checkpoint.
- // If recovering from a unstable stable checkpoint.
- kUnstableRecovering,
- // If recovering from a stable checkpoint.~
- kStableRecovering,
+ kRecovering,
// Used when a secondary node is applying oplog operations from the primary during steady
// state replication.
@@ -200,20 +193,9 @@ public:
kApplyOpsCmd
};
- static bool inRecovering(Mode mode) {
- return mode == Mode::kUnstableRecovering || mode == Mode::kStableRecovering;
- }
-
static StringData modeToString(Mode mode);
static StatusWith<Mode> parseMode(const std::string& mode);
-
- // Server will crash on oplog application failure during recovery from stable checkpoint in the
- // test environment.
- static void checkOnOplogFailureForRecovery(OperationContext* opCtx,
- const mongo::NamespaceString& nss,
- const mongo::BSONObj& oplogEntry,
- const std::string& errorMsg);
};
inline std::ostream& operator<<(std::ostream& s, OplogApplication::Mode mode) {
@@ -221,16 +203,6 @@ inline std::ostream& operator<<(std::ostream& s, OplogApplication::Mode mode) {
}
/**
- * Logs an oplog constraint violation and writes an entry into the health log.
- */
-void logOplogConstraintViolation(OperationContext* opCtx,
- const NamespaceString& nss,
- OplogConstraintViolationEnum type,
- const std::string& operation,
- const BSONObj& opObj,
- boost::optional<Status> status);
-
-/**
* Used for applying from an oplog entry or grouped inserts.
* @param opOrGroupedInserts a single oplog entry or grouped inserts to be applied.
* @param alwaysUpsert convert some updates to upserts for idempotency reasons