summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/sync_tail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/sync_tail.cpp')
-rw-r--r--src/mongo/db/repl/sync_tail.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp
index cb8dd5552c9..53a934ed504 100644
--- a/src/mongo/db/repl/sync_tail.cpp
+++ b/src/mongo/db/repl/sync_tail.cpp
@@ -147,10 +147,8 @@ namespace repl {
// one possible tweak here would be to stay in the read lock for this database
// for multiple prefetches if they are for the same database.
OperationContextImpl txn;
- Client::ReadContext ctx(&txn, ns);
- prefetchPagesForReplicatedOp(&txn,
- ctx.ctx().db(),
- op);
+ AutoGetCollectionForRead ctx(&txn, ns);
+ prefetchPagesForReplicatedOp(&txn, ctx.getDb(), op);
}
catch (const DBException& e) {
LOG(2) << "ignoring exception in prefetchOp(): " << e.what() << endl;