summaryrefslogtreecommitdiff
path: root/src/mongo/db/client.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-11-03 11:42:15 -0500
committerEliot Horowitz <eliot@10gen.com>2014-11-03 14:01:16 -0500
commit9b96c72ec4b8adb65480f33f752fd43b333414f0 (patch)
tree2d7cca0743617a471ebbc8e651a018089d702ebc /src/mongo/db/client.h
parentab7a1d27f130d0f920651181eafe19316c247b13 (diff)
downloadmongo-9b96c72ec4b8adb65480f33f752fd43b333414f0.tar.gz
SERVER-15888: WriteContext will switch from MODE_IX to MODE_X if collection doesn't exist
Diffstat (limited to 'src/mongo/db/client.h')
-rw-r--r--src/mongo/db/client.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/client.h b/src/mongo/db/client.h
index ce2d50717de..86cc28f8c39 100644
--- a/src/mongo/db/client.h
+++ b/src/mongo/db/client.h
@@ -106,6 +106,9 @@ namespace mongo {
bool justCreated() {
return _justCreated;
}
+
+ Lock::DBLock& lock() { return _dbLock; }
+
private:
Lock::DBLock _dbLock; // not const, as we may need to relock for implicit create
Database* _db;
@@ -309,6 +312,7 @@ namespace mongo {
AutoGetOrCreateDb _autodb;
Lock::CollectionLock _collk;
Context _c;
+ Collection* _collection;
};
}; // class Client