summaryrefslogtreecommitdiff
path: root/src/mongo/db/operation_context_impl.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2016-04-22 17:51:53 -0400
committerAndy Schwerin <schwerin@mongodb.com>2016-05-24 11:02:20 -0400
commit47a685fdab7a6506d15e3d37665624594f5e8ea7 (patch)
treebe3511ad6b526e2205ff4dbdcca81416e094b7d7 /src/mongo/db/operation_context_impl.cpp
parent8a08cedcdf5a7edb3ad3da1bcbd2cf2a426be547 (diff)
downloadmongo-47a685fdab7a6506d15e3d37665624594f5e8ea7.tar.gz
SERVER-23905 Move RecoveryUnit storage to OperationContext from its subclasses.
Diffstat (limited to 'src/mongo/db/operation_context_impl.cpp')
-rw-r--r--src/mongo/db/operation_context_impl.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/mongo/db/operation_context_impl.cpp b/src/mongo/db/operation_context_impl.cpp
index 3451dfbecbe..fec4cff0957 100644
--- a/src/mongo/db/operation_context_impl.cpp
+++ b/src/mongo/db/operation_context_impl.cpp
@@ -74,7 +74,7 @@ OperationContextImpl::OperationContextImpl()
: OperationContext(
&cc(), nextOpId.fetchAndAdd(1), clientOperationInfoDecoration(cc()).getLocker()) {
StorageEngine* storageEngine = getServiceContext()->getGlobalStorageEngine();
- _recovery.reset(storageEngine->newRecoveryUnit());
+ setRecoveryUnit(storageEngine->newRecoveryUnit(), kNotInUnitOfWork);
auto client = getClient();
stdx::lock_guard<Client> lk(*client);
@@ -88,22 +88,6 @@ OperationContextImpl::~OperationContextImpl() {
client->resetOperationContext();
}
-RecoveryUnit* OperationContextImpl::recoveryUnit() const {
- return _recovery.get();
-}
-
-RecoveryUnit* OperationContextImpl::releaseRecoveryUnit() {
- return _recovery.release();
-}
-
-OperationContext::RecoveryUnitState OperationContextImpl::setRecoveryUnit(RecoveryUnit* unit,
- RecoveryUnitState state) {
- _recovery.reset(unit);
- RecoveryUnitState oldState = _ruState;
- _ruState = state;
- return oldState;
-}
-
ProgressMeter* OperationContextImpl::setMessage_inlock(const char* msg,
const std::string& name,
unsigned long long progressMeterTotal,