jstests/noPassthrough/salvage_incomplete_rolling_index_builds.js
// Populate collection to avoid empty collection optimization.
Populate collection to avoid empty collection optimization.
Populate collection to avoid empty collection optimization .
function insertDocs(coll, startId, numDocs) {
    const bulk = coll.initializeUnorderedBulkOp();
    for (let i = 0; i < numDocs; ++i) {
        const v = startId + i;
        bulk.insert({_id: v, a: v, b: v});
    }
    assert.commandWorked(bulk.execute());
}
function insertDocs ( coll , startId , numDocs ) { const bulk = coll . initializeUnorderedBulkOp ( ) ; for ( let i = 0 ; i < numDocs ; ++ i ) { const v = startId + i ; bulk . insert ( { _id : v , a : v , b : v } ) ; } assert . commandWorked ( bulk . execute ( ) ) ; }
Populate collection to avoid empty collection optimization.
Populate collection to avoid empty collection optimization .