summaryrefslogtreecommitdiff
path: root/jstests/replsets/initial_sync_drop_collection.js
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2020-02-20 13:43:32 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-20 20:06:51 +0000
commit1cdfbf9d2e497a47a7de2b1fcf9532c238e7320b (patch)
treeb360c231f43bbefdb5e82cb374977bc48ddfe155 /jstests/replsets/initial_sync_drop_collection.js
parentb4915c29d4848439e23857c45fd3fcf94622b015 (diff)
downloadmongo-1cdfbf9d2e497a47a7de2b1fcf9532c238e7320b.tar.gz
SERVER-46235 Fix and re-enable jstests in replica_sets, sharding and core_txns suites.
Diffstat (limited to 'jstests/replsets/initial_sync_drop_collection.js')
-rw-r--r--jstests/replsets/initial_sync_drop_collection.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/jstests/replsets/initial_sync_drop_collection.js b/jstests/replsets/initial_sync_drop_collection.js
index 468b3a1cce9..c31bb363550 100644
--- a/jstests/replsets/initial_sync_drop_collection.js
+++ b/jstests/replsets/initial_sync_drop_collection.js
@@ -139,8 +139,9 @@ let expectedLogFor3and4 =
"`CollectionCloner ns: '${nss}' uuid: UUID(\"${uuid}\") stopped because collection was dropped on source.`";
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":{"$binary":{"base64":"${uuid_base64}","subType":"4"}}}}}`';
}
// We don't support 4.2 style two-phase drops with EMRC=false - in that configuration, the
@@ -148,8 +149,13 @@ if (isJsonLogNoConn()) {
// the cloner queries collection by UUID, it will observe the first drop phase as a rename.
// We still want to check that initial sync succeeds in such a case.
if (TwoPhaseDropCollectionTest.supportsDropPendingNamespaces(replTest)) {
- expectedLogFor3and4 =
- "`Initial Sync retrying CollectionCloner stage query due to QueryPlanKilled: collection renamed from '${nss}' to '${rnss}'. UUID ${uuid}`";
+ if (isJsonLogNoConn()) {
+ expectedLogFor3and4 =
+ '`Initial Sync retrying {cloner} stage {stage} due to {lastError}","attr":{"cloner":"CollectionCloner","stage":"query","lastError":{"code":175,"codeName":"QueryPlanKilled","errmsg":"collection renamed from \'${nss}\' to \'${rnss}\'. UUID ${uuid}`';
+ } else {
+ expectedLogFor3and4 =
+ "`Initial Sync retrying CollectionCloner stage query due to QueryPlanKilled: collection renamed from '${nss}' to '${rnss}'. UUID ${uuid}`";
+ }
}
jsTestLog("[3] Testing drop-pending between getMore calls.");
@@ -178,8 +184,9 @@ runDropTest({
failPoint: "initialSyncHangCollectionClonerAfterHandlingBatchResponse",
secondaryStartupParams: {collectionClonerBatchSize: 1},
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":{"$binary":{"base64":"${uuid_base64}","subType":"4"}}}}}`'
: "`CollectionCloner ns: '${nss}' uuid: UUID(\"${uuid}\") stopped because collection was dropped on source.`"
});
@@ -189,8 +196,9 @@ runDropTest({
failPoint: "initialSyncHangCollectionClonerAfterHandlingBatchResponse",
secondaryStartupParams: {collectionClonerBatchSize: 1},
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":{"$binary":{"base64":"${uuid_base64}","subType":"4"}}}}}`'
: "`CollectionCloner ns: '${nss}' uuid: UUID(\"${uuid}\") stopped because collection was dropped on source.`",
createNew: true
});