From 7bde5a2106ccc529d1bd0a108d629be19f8d995a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3=20=28at=20MongoDB=29?= Date: Wed, 20 Nov 2024 20:14:36 +0000 Subject: [PATCH] SERVER-83104 Remove the multi-version compatibility patch for `capped` and `numInitialChunks` in change stream shard events tests (#29397) GitOrigin-RevId: b01faad140a04e7c8d51ff81412aa36ee1c9102c --- .../change_streams/shard_collection_event.js | 17 ++--------------- .../ddl_commits_trigger_placement_op_entries.js | 10 ---------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/jstests/change_streams/shard_collection_event.js b/jstests/change_streams/shard_collection_event.js index def534b82f0..c0f00ad9712 100644 --- a/jstests/change_streams/shard_collection_event.js +++ b/jstests/change_streams/shard_collection_event.js @@ -44,19 +44,6 @@ function getCollectionUuid(coll) { return collInfo.info.uuid; } -function assertChangeStreamEventEqMultiversionCompatible(actualEvent, expectedEvent) { - // SERVER-83104: Remove 'numInitialChunks' check once 8.0 becomes last LTS. - if ('numInitialChunks' in actualEvent.operationDescription) { - delete actualEvent.operationDescription.numInitialChunks; - } - - // SERVER-83104: Remove 'capped' check once 8.0 becomes last LTS. - if (!('capped' in actualEvent.operationDescription)) { - delete expectedEvent.operationDescription.capped; - } - return assertChangeStreamEventEq(actualEvent, expectedEvent); -} - function assertNextChangeEvent(cursor, expectedEvent) { let events = test.getNextChanges(cursor, 1); while (events.length > 0) { @@ -75,7 +62,7 @@ function assertNextChangeEvent(cursor, expectedEvent) { assert(event.wallTime instanceof Date); delete event.wallTime; expectedEvent.collectionUUID = getCollectionUuid(collName); - assertChangeStreamEventEqMultiversionCompatible(event, expectedEvent); + assertChangeStreamEventEq(event, expectedEvent); } function runTest(startChangeStream) { @@ -107,7 +94,7 @@ function runTest(startChangeStream) { } const shardEvent = events[0]; - assertChangeStreamEventEqMultiversionCompatible(shardEvent, expectedOutput); + assertChangeStreamEventEq(shardEvent, expectedOutput); // Insert a document before starting the next change stream so that we can validate the // resuming behavior. diff --git a/jstests/sharding/ddl_commits_trigger_placement_op_entries.js b/jstests/sharding/ddl_commits_trigger_placement_op_entries.js index d31772966ea..b92fca59cf5 100644 --- a/jstests/sharding/ddl_commits_trigger_placement_op_entries.js +++ b/jstests/sharding/ddl_commits_trigger_placement_op_entries.js @@ -46,16 +46,6 @@ function verifyOpEntriesOnNodes(expectedOpEntryTemplates, nodes) { assert.eq(expectedOpEntryTemplates.length, foundOpEntries.length); for (let i = 0; i < foundOpEntries.length; ++i) { - // SERVER-83104: Remove 'numInitialChunks' check once 8.0 becomes last LTS. - if ('numInitialChunks' in foundOpEntries[i].o2) { - delete foundOpEntries[i].o2.numInitialChunks; - } - - // SERVER-83104: Remove 'capped' check once 8.0 becomes last LTS. - if (!('capped' in foundOpEntries[i].o2)) { - delete expectedOpEntryTemplates[i].o2.capped; - } - assert.eq(expectedOpEntryTemplates[i].op, foundOpEntries[i].op); assert.eq(expectedOpEntryTemplates[i].ns, foundOpEntries[i].ns); assert.docEq(expectedOpEntryTemplates[i].o, foundOpEntries[i].o);