jstests/replsets/index_delete.js
/**
 * Starts a replica set with arbiter, build an index
 * drop index once secondary starts building index,
 * index should not exist on secondary afterwards
 */
Starts a replica set with arbiter, build an index
drop index once secondary starts building index,
index should not exist on secondary afterwards
Starts a replica set with arbiter build an index drop index once secondary starts building index index should not exist on secondary afterwards
function indexBuildInProgress(checkDB) {
    var inprog = checkDB.currentOp().inprog;
    var indexOps = inprog.filter(function(op) {
        if (op.msg && op.msg.includes('Index Build')) {
            if (op.progress && (op.progress.done / op.progress.total) > 0.20) {
                printjson(op);
                return true;
            }
        }
    });
    return indexOps.length > 0;
}
function indexBuildInProgress ( checkDB ) { var inprog = checkDB . currentOp ( ) . inprog ; var indexOps = inprog . filter ( function ( op ) { if ( op . msg && op . msg . includes ( 'Index Build' ) ) { if ( op . progress && ( op . progress . done / op . progress . total ) > 0.20 ) { printjson ( op ) ; return true ; } } } ) ; return indexOps . length > 0 ; }
Starts a replica set with arbiter, build an index
 drop index once secondary starts building index,
 index should not exist on secondary afterwards
Starts a replica set with arbiter build an index drop index once secondary starts building index index should not exist on secondary afterwards