jstests/sharding/change_streams_shards_start_in_sync.js
// Helper function to list all idle cursors on the test namespace, with an optional extra filter.
Helper function to list all idle cursors on the test namespace, with an optional extra filter.
Helper function to list all idle cursors on the test namespace with an optional extra filter .
function listIdleCursorsOnTestNs(rs, filter = {}) {
    return rs.getPrimary()
        .getDB('admin')
        .aggregate([
            {$currentOp: {idleCursors: true}},
            {
                $match: {
                    ns: mongosColl.getFullName(),
                    type: "idleCursor",
                }
            },
            {$match: filter}
        ])
        .toArray();
}
function listIdleCursorsOnTestNs ( rs , filter = { } ) { return rs . getPrimary ( ) . getDB ( 'admin' ) . aggregate ( [ { $currentOp : { idleCursors : true } } , { $match : { ns : mongosColl . getFullName ( ) , type : "idleCursor" , } } , { $match : filter } ] ) . toArray ( ) ; }
Helper function to list all idle cursors on the test namespace, with an optional extra filter.
Helper function to list all idle cursors on the test namespace with an optional extra filter .