[SERVER-21526] should use RAII type for WiredTigerSessionCache::getSession Created: 18/Nov/15  Updated: 22/Feb/16  Resolved: 10/Feb/16

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.3.2

Type: Bug Priority: Minor - P4
Reporter: Geert Bosch Assignee: Kyle Suarez
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-21657 WiredTigerRecordStore::compact should... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Integration F (02/01/16), Integration 10 (02/22/16)
Participants:

 Description   

Currently we depend on all callers taking appropriate measures to avoid leaking sessions, which is error-prone.



 Comments   
Comment by Githook User [ 10/Feb/16 ]

Author:

{u'username': u'ksuarz', u'name': u'Kyle Suarez', u'email': u'ksuarz@gmail.com'}

Message: 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.
Branch: master
https://github.com/mongodb/mongo/commit/cfac7b582eaa5539dc05590ec5d974d732d404d2

Generated at Thu Feb 08 03:57:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.