diff options
author | Kyle Suarez <ksuarz@gmail.com> | 2016-02-10 13:44:10 -0500 |
---|---|---|
committer | Kyle Suarez <kyle.suarez@mongodb.com> | 2016-02-10 15:33:17 -0500 |
commit | cfac7b582eaa5539dc05590ec5d974d732d404d2 (patch) | |
tree | 417dd4c4bd734e8ac56372da77a1ea9f08f030fa /src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp | |
parent | e9a856d0fe34c7cd1087dacd334f142cd7e62308 (diff) | |
download | mongo-cfac7b582eaa5539dc05590ec5d974d732d404d2.tar.gz |
SERVER-21526 use RAII type for WTSessionCache::getSession
WiredTigerSessionCache::getSession() returns unique pointers to
WiredTigerSessions rather than bare pointers. These pointers will automatically
call releaseSession() on scope exit.
ON_BLOCK_EXIT and other cleanup code has been removed.
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp index bd522ebf4bc..4cebed3eb61 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp @@ -441,7 +441,6 @@ public: ~BulkBuilder() { _cursor->close(_cursor); - WiredTigerRecoveryUnit::get(_txn)->getSessionCache()->releaseSession(_session); } protected: @@ -468,7 +467,7 @@ protected: const Ordering _ordering; OperationContext* const _txn; - WiredTigerSession* const _session; + UniqueWiredTigerSession const _session; WT_CURSOR* const _cursor; }; |