diff options
Diffstat (limited to 'jstests/noPassthrough')
-rw-r--r-- | jstests/noPassthrough/index_build_out_of_order_scan.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/jstests/noPassthrough/index_build_out_of_order_scan.js b/jstests/noPassthrough/index_build_out_of_order_scan.js index f6491f9c70e..ebc2d1dbf00 100644 --- a/jstests/noPassthrough/index_build_out_of_order_scan.js +++ b/jstests/noPassthrough/index_build_out_of_order_scan.js @@ -31,6 +31,11 @@ const hangAfterInitializingIndexBuild = const createIdx = IndexBuildTest.startIndexBuild( primary, primaryColl.getFullName(), {a: 1}, null, [ErrorCodes.DataCorruptionDetected]); +const buildUUID = + IndexBuildTest + .assertIndexesSoon(primaryColl, 2, ['_id_'], ['a_1'], {includeBuildUUIDs: true})['a_1'] + .buildUUID; + hangAfterInitializingIndexBuild.wait(); const WTRecordStoreUassertOutOfOrder = configureFailPoint(primary, "WTRecordStoreUassertOutOfOrder"); @@ -39,8 +44,23 @@ const hangBeforeAbort = hangAfterInitializingIndexBuild.off(); hangBeforeAbort.wait(); + +// Get collection UUID. +const collInfos = primaryDB.getCollectionInfos({name: primaryColl.getName()}); +assert.eq(collInfos.length, 1, collInfos); +const collUUID = collInfos[0].info.uuid; + // Index build: data corruption detected. -checkLog.containsJson(primary, 7333600); +checkLog.containsJson(primary, 7333600, { + buildUUID: function(uuid) { + return uuid && uuid["uuid"]["$uuid"] === extractUUIDFromObject(buildUUID); + }, + db: primaryDB.getName(), + collectionUUID: function(uuid) { + jsTestLog(collUUID); + return uuid && uuid["uuid"]["$uuid"] === extractUUIDFromObject(collUUID); + } +}); assert.eq(1, primaryDB.serverStatus().indexBuilds.failedDueToDataCorruption); // Disable out-of-order failpoint so clean-up can succeed. |