summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2022-08-25 15:30:41 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-25 16:18:39 +0000
commitf08fc26ba70e757df4f5cc1287f0d392964b6b53 (patch)
tree45ee2532b2d9d362c4f237f299cade45713876aa /src/mongo/db/repl
parent0ead2f7196a757e41bd5b00428519daa2baa4700 (diff)
downloadmongo-f08fc26ba70e757df4f5cc1287f0d392964b6b53.tar.gz
SERVER-67549 Change dropDatabase command path to use DatabaseName
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r--src/mongo/db/repl/oplog.cpp2
-rw-r--r--src/mongo/db/repl/storage_timestamp_test.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp
index ec7408bfcd7..5b9d47ffcf0 100644
--- a/src/mongo/db/repl/oplog.cpp
+++ b/src/mongo/db/repl/oplog.cpp
@@ -991,7 +991,7 @@ const StringMap<ApplyOpMetadata> kOpsMap = {
{"dbCheck", {dbCheckOplogCommand, {}}},
{"dropDatabase",
{[](OperationContext* opCtx, const OplogEntry& entry, OplogApplication::Mode mode) -> Status {
- return dropDatabaseForApplyOps(opCtx, entry.getNss().db().toString());
+ return dropDatabaseForApplyOps(opCtx, entry.getNss().dbName());
},
{ErrorCodes::NamespaceNotFound}}},
{"drop",
diff --git a/src/mongo/db/repl/storage_timestamp_test.cpp b/src/mongo/db/repl/storage_timestamp_test.cpp
index 50a4f0ac7d3..d0fa308e2a6 100644
--- a/src/mongo/db/repl/storage_timestamp_test.cpp
+++ b/src/mongo/db/repl/storage_timestamp_test.cpp
@@ -1936,11 +1936,11 @@ public:
const Timestamp dropTime = _clock->tickClusterTime(1).asTimestamp();
if (simulatePrimary) {
- ASSERT_OK(dropDatabaseForApplyOps(_opCtx, nss.db().toString()));
+ ASSERT_OK(dropDatabaseForApplyOps(_opCtx, nss.dbName()));
} else {
repl::UnreplicatedWritesBlock uwb(_opCtx);
TimestampBlock ts(_opCtx, dropTime);
- ASSERT_OK(dropDatabaseForApplyOps(_opCtx, nss.db().toString()));
+ ASSERT_OK(dropDatabaseForApplyOps(_opCtx, nss.dbName()));
}
// Assert that the idents do not exist.