summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_catalog.h
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2017-07-26 16:31:59 -0400
committerRandolph Tan <randolph@10gen.com>2017-07-28 17:04:04 -0400
commit9abf0ffe9f50d069078b5cb708cc8aaf518f5405 (patch)
tree20fef3e9f3c4d6db71ad848599f17f4a72c85c4a /src/mongo/db/session_catalog.h
parent356a36dea183db5afedb932ed4c086f17c4173d0 (diff)
downloadmongo-9abf0ffe9f50d069078b5cb708cc8aaf518f5405.tar.gz
SERVER-30318 Allow multiple instances of OperationContextSession per OperationContext
Diffstat (limited to 'src/mongo/db/session_catalog.h')
-rw-r--r--src/mongo/db/session_catalog.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/session_catalog.h b/src/mongo/db/session_catalog.h
index 5d2ab0c17e1..a504d24bf6c 100644
--- a/src/mongo/db/session_catalog.h
+++ b/src/mongo/db/session_catalog.h
@@ -151,7 +151,9 @@ class ScopedSession {
public:
ScopedSession(OperationContext* opCtx, std::shared_ptr<SessionCatalog::SessionRuntimeInfo> sri)
- : _opCtx(opCtx), _sri(std::move(sri)) {}
+ : _opCtx(opCtx), _sri(std::move(sri)) {
+ invariant(_sri);
+ }
ScopedSession(ScopedSession&&) = default;