summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.cpp
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-03-29 15:40:44 -0400
committerMaria van Keulen <maria@mongodb.com>2017-04-06 11:37:56 -0400
commit1cbb67b8acf6c579a8ef99f9b3bf74394bbd11c3 (patch)
tree426da6552cf3bb3315e46f925b0f3071e9979300 /src/mongo/db/db_raii.cpp
parent4516cbf1786f35557fe2f2e26e2e25373aa7af83 (diff)
downloadmongo-1cbb67b8acf6c579a8ef99f9b3bf74394bbd11c3.tar.gz
SERVER-28543 Add OperationContext as an argument to getCollection
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r--src/mongo/db/db_raii.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp
index 8001b658a09..9098e3bf1a1 100644
--- a/src/mongo/db/db_raii.cpp
+++ b/src/mongo/db/db_raii.cpp
@@ -52,7 +52,7 @@ AutoGetCollection::AutoGetCollection(OperationContext* opCtx,
: _viewMode(viewMode),
_autoDb(opCtx, nss.db(), modeDB),
_collLock(opCtx->lockState(), nss.ns(), modeColl),
- _coll(_autoDb.getDb() ? _autoDb.getDb()->getCollection(nss) : nullptr) {
+ _coll(_autoDb.getDb() ? _autoDb.getDb()->getCollection(opCtx, nss) : nullptr) {
Database* db = _autoDb.getDb();
// If the database exists, but not the collection, check for views.
if (_viewMode == ViewMode::kViewsForbidden && db && !_coll &&
@@ -251,7 +251,7 @@ OldClientWriteContext::OldClientWriteContext(OperationContext* opCtx, const std:
_autodb(opCtx, _nss.db(), MODE_IX),
_collk(opCtx->lockState(), ns, MODE_IX),
_c(opCtx, ns, _autodb.getDb(), _autodb.justCreated()) {
- _collection = _c.db()->getCollection(ns);
+ _collection = _c.db()->getCollection(opCtx, ns);
if (!_collection && !_autodb.justCreated()) {
// relock database in MODE_X to allow collection creation
_collk.relockAsDatabaseExclusive(_autodb.lock());