jstests/concurrency/fsm_workloads_add_remove_shards/clusterwide_ops_with_add_remove_shards.js
// Helper to close a clusterwide cursor, given a command result.
Helper to close a clusterwide cursor, given a command result.
Helper to close a clusterwide cursor given a command result .
function closeClusterWideCursor(db, res) {
        if (res.ok) {
            db.adminCommand({
                killCursors: "$cmd.aggregate",
                cursors: [res.cursor.id],
            });
        }
    }
function closeClusterWideCursor ( db , res ) { if ( res . ok ) { db . adminCommand ( { killCursors : "$cmd.aggregate" , cursors : [ res . cursor . id ] , } ) ; } }
Helper to close a clusterwide cursor, given a command result.
Helper to close a clusterwide cursor given a command result .