From a223322ef7df075739cbe44a488d82c830df19d9 Mon Sep 17 00:00:00 2001 From: Henrik Edin Date: Mon, 24 Feb 2020 15:32:58 -0500 Subject: SERVER-46361 Format UUID as $uuid: in logv2 --- jstests/replsets/initial_sync_drop_collection.js | 7 +++---- jstests/replsets/initial_sync_rename_collection.js | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'jstests/replsets') diff --git a/jstests/replsets/initial_sync_drop_collection.js b/jstests/replsets/initial_sync_drop_collection.js index c31bb363550..77d0f2a4427 100644 --- a/jstests/replsets/initial_sync_drop_collection.js +++ b/jstests/replsets/initial_sync_drop_collection.js @@ -67,7 +67,6 @@ function finishTest({failPoint, expectedLog, waitForDrop, createNew}) { // Get the uuid for use in checking the log line. const uuid_obj = getUUIDFromListCollections(primaryDB, collName); const uuid = extractUUIDFromObject(uuid_obj); - const uuid_base64 = uuid_obj.base64(); jsTestLog("Dropping collection on primary: " + primaryColl.getFullName()); assert(primaryColl.drop()); @@ -141,7 +140,7 @@ let expectedLogFor3and4 = if (isJsonLogNoConn()) { // Double escape the backslash as eval will do unescaping expectedLogFor3and4 = - '`CollectionCloner ns: \'{ns}\' uuid: UUID(\\\\"{uuid}\\\\") stopped because collection was dropped on source.","attr":{"ns":"${nss}","uuid":{"uuid":{"$binary":{"base64":"${uuid_base64}","subType":"4"}}}}}`'; + '`CollectionCloner ns: \'{ns}\' uuid: UUID(\\\\"{uuid}\\\\") stopped because collection was dropped on source.","attr":{"ns":"${nss}","uuid":{"uuid":{"$uuid":"${uuid}"}}}}`'; } // We don't support 4.2 style two-phase drops with EMRC=false - in that configuration, the @@ -186,7 +185,7 @@ runDropTest({ waitForDrop: true, // Double escape the backslash as eval will do unescaping expectedLog: isJsonLogNoConn() - ? '`CollectionCloner ns: \'{ns}\' uuid: UUID(\\\\"{uuid}\\\\") stopped because collection was dropped on source.","attr":{"ns":"${nss}","uuid":{"uuid":{"$binary":{"base64":"${uuid_base64}","subType":"4"}}}}}`' + ? '`CollectionCloner ns: \'{ns}\' uuid: UUID(\\\\"{uuid}\\\\") stopped because collection was dropped on source.","attr":{"ns":"${nss}","uuid":{"uuid":{"$uuid":"${uuid}"}}}}`' : "`CollectionCloner ns: '${nss}' uuid: UUID(\"${uuid}\") stopped because collection was dropped on source.`" }); @@ -198,7 +197,7 @@ runDropTest({ waitForDrop: true, // Double escape the backslash as eval will do unescaping expectedLog: isJsonLogNoConn() - ? '`CollectionCloner ns: \'{ns}\' uuid: UUID(\\\\"{uuid}\\\\") stopped because collection was dropped on source.","attr":{"ns":"${nss}","uuid":{"uuid":{"$binary":{"base64":"${uuid_base64}","subType":"4"}}}}}`' + ? '`CollectionCloner ns: \'{ns}\' uuid: UUID(\\\\"{uuid}\\\\") stopped because collection was dropped on source.","attr":{"ns":"${nss}","uuid":{"uuid":{"$uuid":"${uuid}"}}}}`' : "`CollectionCloner ns: '${nss}' uuid: UUID(\"${uuid}\") stopped because collection was dropped on source.`", createNew: true }); diff --git a/jstests/replsets/initial_sync_rename_collection.js b/jstests/replsets/initial_sync_rename_collection.js index 2bbbb3d3c70..60d94c76ec5 100644 --- a/jstests/replsets/initial_sync_rename_collection.js +++ b/jstests/replsets/initial_sync_rename_collection.js @@ -75,7 +75,6 @@ function finishTest({failPoint, expectedLog, createNew, renameAcrossDBs}) { // Get the uuid for use in checking the log line. const uuid_obj = getUUIDFromListCollections(primaryDB, collName); const uuid = extractUUIDFromObject(uuid_obj); - const uuid_base64 = uuid_obj.base64(); const target = (renameAcrossDBs ? pCrossDBRenameColl : pRenameColl); jsTestLog("Renaming collection on primary: " + target.getFullName()); @@ -180,7 +179,7 @@ let expectedLogFor6and8 = if (isJsonLogNoConn()) { // Double escape the backslash as eval will do unescaping expectedLogFor6and8 = - '`CollectionCloner ns: \'{ns}\' uuid: UUID(\\\\"{uuid}\\\\") stopped because collection was dropped on source.","attr":{"ns":"${nss}","uuid":{"uuid":{"$binary":{"base64":"${uuid_base64}","subType":"4"}}}}}`'; + '`CollectionCloner ns: \'{ns}\' uuid: UUID(\\\\"{uuid}\\\\") stopped because collection was dropped on source.","attr":{"ns":"${nss}","uuid":{"uuid":{"$uuid":"${uuid}"}}}}`'; } // We don't support 4.2 style two-phase drops with EMRC=false - in that configuration, the -- cgit v1.2.1