jstests/multiVersion/genericBinVersion/keystring_index.js
// NOTE: getDoc is called exactly numDocs times.
getDoc is called exactly numDocs times.
getDoc is called exactly numDocs times .
function insertDocumentsUnique(collection, numDocs, getDoc) {
    var bulk = collection.initializeUnorderedBulkOp();
    for (let i = 0; i < numDocs; i++) {
        let doc = getDoc(i);
        bulk.insert(doc);
    }
    assert.commandWorked(bulk.execute());
}
function insertDocumentsUnique ( collection , numDocs , getDoc ) { var bulk = collection . initializeUnorderedBulkOp ( ) ; for ( let i = 0 ; i < numDocs ; i ++ ) { let doc = getDoc ( i ) ; bulk . insert ( doc ) ; } assert . commandWorked ( bulk . execute ( ) ) ; }
NOTE: getDoc is called exactly numDocs times.
NOTE : getDoc is called exactly numDocs times .