summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/replsets/standalone_replication_recovery_relaxes_index_constraints.js5
-rw-r--r--src/mongo/db/index_builds_coordinator.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/jstests/replsets/standalone_replication_recovery_relaxes_index_constraints.js b/jstests/replsets/standalone_replication_recovery_relaxes_index_constraints.js
index 3b8de49b3bd..596192d5955 100644
--- a/jstests/replsets/standalone_replication_recovery_relaxes_index_constraints.js
+++ b/jstests/replsets/standalone_replication_recovery_relaxes_index_constraints.js
@@ -57,6 +57,11 @@ node = rst.restart(node, {
noReplSet: true,
setParameter: {recoverFromOplogAsStandalone: true, logComponentVerbosity: logLevel}
});
+
+// Verify that the 'config.system.indexBuilds' collection is empty after recovering from the oplog
+// in standalone mode.
+assert.eq(0, node.getCollection("config.system.indexBuilds").count());
+
reconnect(node);
rst.stopSet();
diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp
index 0cf8bf00c6a..e801fd1c9fd 100644
--- a/src/mongo/db/index_builds_coordinator.cpp
+++ b/src/mongo/db/index_builds_coordinator.cpp
@@ -192,8 +192,9 @@ void removeIndexBuildEntryAfterCommitOrAbort(OperationContext* opCtx,
}
if (replCoord->getSettings().shouldRecoverFromOplogAsStandalone()) {
- // TODO SERVER-60753: Remove this mixed-mode write.
- opCtx->recoveryUnit()->allowUntimestampedWrite();
+ // Writes to the 'config.system.indexBuilds' collection are replicated and the index entry
+ // will be removed when the delete oplog entry is replayed at a later time.
+ return;
}
auto status = indexbuildentryhelpers::removeIndexBuildEntry(