summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/snapshot_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/snapshot_helper.cpp')
-rw-r--r--src/mongo/db/storage/snapshot_helper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/storage/snapshot_helper.cpp b/src/mongo/db/storage/snapshot_helper.cpp
index a610672c78d..8470f74dc92 100644
--- a/src/mongo/db/storage/snapshot_helper.cpp
+++ b/src/mongo/db/storage/snapshot_helper.cpp
@@ -100,7 +100,8 @@ bool shouldReadAtLastApplied(OperationContext* opCtx,
// being applied and we can read from the default snapshot. If we are in a replication state
// (like secondary or primary catch-up) where we are not accepting writes, we should read at
// lastApplied.
- if (repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesForDatabase(opCtx, "admin")) {
+ if (repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesForDatabase(
+ opCtx, DatabaseName::kAdmin)) {
if (reason) {
*reason = "primary";
}