jstests/libs/override_methods/inject_tenant_prefix.js
/**
 * Remove the indices for non-upsert writes that succeeded.
 */
Remove the indices for non-upsert writes that succeeded.
Remove the indices for non - upsert writes that succeeded .
function removeSuccessfulOpIndexesExceptForUpserted(resObj, indexMap, ordered) {
    let indexSetForUpserted = toIndexSet(resObj.upserted);
    let indexSetForWriteErrors = toIndexSet(resObj.writeErrors);
    for (let index in Object.keys(indexMap)) {
        if ((!indexSetForUpserted.has(parseInt(index)) &&
             !(ordered && resObj.writeErrors && (index > resObj.writeErrors[0].index)) &&
             !indexSetForWriteErrors.has(parseInt(index)))) {
            delete indexMap[index];
        }
    }
    return indexMap;
}
function removeSuccessfulOpIndexesExceptForUpserted ( resObj , indexMap , ordered ) { let indexSetForUpserted = toIndexSet ( resObj . upserted ) ; let indexSetForWriteErrors = toIndexSet ( resObj . writeErrors ) ; for ( let index in Object . keys ( indexMap ) ) { if ( ( ! indexSetForUpserted . has ( parseInt ( index ) ) && ! ( ordered && resObj . writeErrors && ( index > resObj . writeErrors [ 0 ] . index ) ) && ! indexSetForWriteErrors . has ( parseInt ( index ) ) ) ) { delete indexMap [ index ] ; } } return indexMap ; }
Remove the indices for non-upsert writes that succeeded.
Remove the indices for non - upsert writes that succeeded .
// Optimization to only look through the indices in a set rather than in an array.