diff options
author | Mihai Andrei <mihai.andrei@10gen.com> | 2022-06-30 20:38:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-30 21:39:25 +0000 |
commit | 17f49ab8b16a6f45371771d8c152cfbf4ed186af (patch) | |
tree | 882643f79f42b6b0267cbc870eb03b135f231e1c /jstests/noPassthrough | |
parent | 69ce17c6b02c009fc2d0502c6761f8a3e2e541ee (diff) | |
download | mongo-17f49ab8b16a6f45371771d8c152cfbf4ed186af.tar.gz |
SERVER-50301 Delete code which handles $v:1 update oplog entries
Diffstat (limited to 'jstests/noPassthrough')
5 files changed, 18 insertions, 13 deletions
diff --git a/jstests/noPassthrough/apply_ops_atomic.js b/jstests/noPassthrough/apply_ops_atomic.js index 1d30fb016d9..9e62a1c74e3 100644 --- a/jstests/noPassthrough/apply_ops_atomic.js +++ b/jstests/noPassthrough/apply_ops_atomic.js @@ -112,9 +112,12 @@ function validateInsertApplyOpsInOplog(conn, ns, uuid, id) { assert.eq(0, coll.find({"_id": idUnexisting}).itcount()); assert.eq(0, coll.find({"_id": idUpserted}).itcount()); const op = { - applyOps: [ - {op: 'u', ns: coll.getFullName(), o2: {_id: idUnexisting}, o: {$set: {_id: idUpserted}}} - ] + applyOps: [{ + op: 'u', + ns: coll.getFullName(), + o2: {_id: idUnexisting}, + o: {$v: 2, diff: {u: {_id: idUpserted}}} + }] }; assert.commandWorked(db.runCommand(op)); assert.eq(0, coll.find({"_id": idUnexisting}).itcount()); @@ -137,7 +140,7 @@ function validateInsertApplyOpsInOplog(conn, ns, uuid, id) { op: 'u', ns: coll.getFullName(), o2: {_id: 1}, - o: {$set: {a: "b"}}, + o: {$v: 2, diff: {u: {a: "b"}}}, }] })); assert.eq(1, coll.find().itcount()); diff --git a/jstests/noPassthrough/apply_ops_mode.js b/jstests/noPassthrough/apply_ops_mode.js index 9f069e2eca8..3bf4317de93 100644 --- a/jstests/noPassthrough/apply_ops_mode.js +++ b/jstests/noPassthrough/apply_ops_mode.js @@ -17,7 +17,7 @@ var coll = db.getCollection("apply_ops_mode1"); var id = ObjectId(); for (let updateOp of [ // An update with a modifier. - {op: 'u', ns: coll.getFullName(), o: {$set: {x: 1}}, o2: {_id: id}}, + {op: 'u', ns: coll.getFullName(), o: {$v: 2, diff: {u: {x: 1}}}, o2: {_id: id}}, // A full-document replace. {op: 'u', ns: coll.getFullName(), o: {_id: id, x: 1}, o2: {_id: id}}, ]) { diff --git a/jstests/noPassthrough/oplog_writes_only_permitted_on_standalone.js b/jstests/noPassthrough/oplog_writes_only_permitted_on_standalone.js index 23ca9da88f3..5081d3a3be1 100644 --- a/jstests/noPassthrough/oplog_writes_only_permitted_on_standalone.js +++ b/jstests/noPassthrough/oplog_writes_only_permitted_on_standalone.js @@ -29,7 +29,7 @@ function constructOplogEntry(oplog) { const toInsertTS = Timestamp(highestTS.getTime(), highestTS.getInc() + 1); return Object.extend( testCollOplogEntry, - {op: "u", ns: "test.coll", o: {$set: {a: 1}}, o2: {_id: 0}, ts: toInsertTS}); + {op: "u", ns: "test.coll", o: {$v: 2, diff: {u: {a: 1}}}, o2: {_id: 0}, ts: toInsertTS}); } let toInsert = constructOplogEntry(oplog); diff --git a/jstests/noPassthrough/server_write_concern_metrics.js b/jstests/noPassthrough/server_write_concern_metrics.js index 61b18ff1b1f..c0b646d7b0d 100644 --- a/jstests/noPassthrough/server_write_concern_metrics.js +++ b/jstests/noPassthrough/server_write_concern_metrics.js @@ -292,11 +292,13 @@ for (const isPSASet of [true, false]) { // application, as testWriteConcernMetrics will run them multiple times. testWriteConcernMetrics( {applyOps: [{op: "i", ns: testColl.getFullName(), o: {_id: 0}}]}, "insert", 1, isPSASet); - testWriteConcernMetrics( - {applyOps: [{op: "u", ns: testColl.getFullName(), o2: {_id: 0}, o: {$set: {a: 1}}}]}, - "update", - 1, - isPSASet); + testWriteConcernMetrics({ + applyOps: + [{op: "u", ns: testColl.getFullName(), o2: {_id: 0}, o: {$v: 2, diff: {u: {a: 1}}}}] + }, + "update", + 1, + isPSASet); testWriteConcernMetrics({applyOps: [{op: "d", ns: testColl.getFullName(), o: {_id: 0}}]}, "delete", 1, diff --git a/jstests/noPassthrough/write_change_stream_pit_preimage_in_transaction.js b/jstests/noPassthrough/write_change_stream_pit_preimage_in_transaction.js index ce69fe0a092..4000a318405 100644 --- a/jstests/noPassthrough/write_change_stream_pit_preimage_in_transaction.js +++ b/jstests/noPassthrough/write_change_stream_pit_preimage_in_transaction.js @@ -209,7 +209,7 @@ function getCollections(db) { assertPreImagesWrittenForOps(testDB, function() { assert.commandWorked(testDB.runCommand({ applyOps: [ - {op: "u", ns: coll.getFullName(), o2: {_id: 1}, o: {$set: {a: 2}}}, + {op: "u", ns: coll.getFullName(), o2: {_id: 1}, o: {$v: 2, diff: {u: {a: 2}}}}, {op: "d", ns: coll.getFullName(), o: {_id: 2}} ], allowAtomic: false, @@ -226,7 +226,7 @@ function getCollections(db) { assertPreImagesWrittenForOps(testDB, function() { assert.commandWorked(testDB.runCommand({ applyOps: [ - {op: "u", ns: coll.getFullName(), o2: {_id: 1}, o: {$set: {a: 2}}}, + {op: "u", ns: coll.getFullName(), o2: {_id: 1}, o: {$v: 2, diff: {u: {a: 2}}}}, {op: "d", ns: coll.getFullName(), o: {_id: 2}} ], })); |