summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2016-01-06 18:06:16 -0500
committerDianna Hohensee <dianna.hohensee@10gen.com>2016-01-15 15:23:14 -0500
commit2d8008289b9d075c56841dc08830bb7cff28aeaf (patch)
tree4b382af4f4f65765f55661b9a54a62f988e3a494 /src/mongo/dbtests
parent64a7daba1746dcda0f7d25eab82d35e2c093d54f (diff)
downloadmongo-2d8008289b9d075c56841dc08830bb7cff28aeaf.tar.gz
SERVER-22057 refactor OpObserver::onUpdate and MigrationSourceManager::logUpdateOp to directly take the updated document
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r--src/mongo/dbtests/query_stage_count.cpp5
-rw-r--r--src/mongo/dbtests/query_stage_sort.cpp7
2 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/dbtests/query_stage_count.cpp b/src/mongo/dbtests/query_stage_count.cpp
index b64a9e7f794..c1becf08025 100644
--- a/src/mongo/dbtests/query_stage_count.cpp
+++ b/src/mongo/dbtests/query_stage_count.cpp
@@ -117,7 +117,8 @@ public:
void update(const RecordId& oldLoc, const BSONObj& newDoc) {
WriteUnitOfWork wunit(&_txn);
BSONObj oldDoc = _coll->getRecordStore()->dataFor(&_txn, oldLoc).releaseToBson();
- oplogUpdateEntryArgs args;
+ OplogUpdateEntryArgs args;
+ args.ns = _coll->ns().ns();
_coll->updateDocument(&_txn,
oldLoc,
Snapshotted<BSONObj>(_txn.recoveryUnit()->getSnapshotId(), oldDoc),
@@ -125,7 +126,7 @@ public:
false,
true,
NULL,
- args);
+ &args);
wunit.commit();
}
diff --git a/src/mongo/dbtests/query_stage_sort.cpp b/src/mongo/dbtests/query_stage_sort.cpp
index 6560258fd69..0349c0de3db 100644
--- a/src/mongo/dbtests/query_stage_sort.cpp
+++ b/src/mongo/dbtests/query_stage_sort.cpp
@@ -352,10 +352,11 @@ public:
// This allows us to check that we don't return the new copy of a doc by asserting
// foo < limit().
BSONObj newDoc = BSON("_id" << updatedId << "foo" << limit() + 10);
- oplogUpdateEntryArgs args;
+ OplogUpdateEntryArgs args;
+ args.ns = coll->ns().ns();
{
WriteUnitOfWork wuow(&_txn);
- coll->updateDocument(&_txn, *it, oldDoc, newDoc, false, false, NULL, args);
+ coll->updateDocument(&_txn, *it, oldDoc, newDoc, false, false, NULL, &args);
wuow.commit();
}
exec->restoreState();
@@ -373,7 +374,7 @@ public:
oldDoc = coll->docFor(&_txn, *it);
{
WriteUnitOfWork wuow(&_txn);
- coll->updateDocument(&_txn, *it++, oldDoc, newDoc, false, false, NULL, args);
+ coll->updateDocument(&_txn, *it++, oldDoc, newDoc, false, false, NULL, &args);
wuow.commit();
}
}