diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-04-22 17:51:53 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-05-24 11:02:20 -0400 |
commit | 47a685fdab7a6506d15e3d37665624594f5e8ea7 (patch) | |
tree | be3511ad6b526e2205ff4dbdcca81416e094b7d7 /src/mongo/db/operation_context_impl.cpp | |
parent | 8a08cedcdf5a7edb3ad3da1bcbd2cf2a426be547 (diff) | |
download | mongo-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.cpp | 18 |
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, |