Skip to content

Commit

Permalink
SERVER-17947 Avoid using WriteUnitOfWork as a member variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
visemet committed Apr 30, 2015
1 parent 82596f0 commit 8888296
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/mongo/dbtests/oplogstarttests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ namespace OplogStartTests {
Base() : _txn(),
_scopedXact(&_txn, MODE_X),
_lk(_txn.lockState()),
_wunit(&_txn),
_context(&_txn, ns()),
_client(&_txn) {

Collection* c = _context.db()->getCollection(ns());
if (!c) {
WriteUnitOfWork wuow(&_txn);
c = _context.db()->createCollection(&_txn, ns());
wuow.commit();
}
ASSERT(c->getIndexCatalog()->haveIdIndex(&_txn));
}

~Base() {
client()->dropCollection(ns());
_wunit.commit();

// The OplogStart stage is not allowed to outlive it's RecoveryUnit.
_stage.reset();
Expand Down Expand Up @@ -107,7 +107,6 @@ namespace OplogStartTests {
OperationContextImpl _txn;
ScopedTransaction _scopedXact;
Lock::GlobalWrite _lk;
WriteUnitOfWork _wunit;
OldClientContext _context;

DBDirectClient _client;
Expand Down

0 comments on commit 8888296

Please sign in to comment.