jstests/concurrency/fsm_workloads/find_cmd_with_indexes_timeseries.js
/**
         * Query all of the time-series collection documents by meta field. This query will either
         * scan the collection or use the meta field index (if present).
         */
Query all of the time-series collection documents by meta field. This query will either
scan the collection or use the meta field index (if present).
Query all of the time - series collection documents by meta field . This query will either scan the collection or use the meta field index ( if present ) .
function queryMetaAll(db, collName) {
            const coll = db.getCollection(getCollectionName(collName));
            try {
                const queryDocs = coll.find({[metaIndexKey]: {$gte: 0}}).toArray();
                assertAlways.eq(
                    numDocs,
                    queryDocs.length,
                    "Failed to find " + numDocs +
                        " documents with meta field greater than or equal to 0. Query results: " +
                        tojson(queryDocs));
            } catch (e) {
                assertAlways(e.code == ErrorCodes.QueryPlanKilled,
                             "Expected a QueryPlanKilled error, but encountered: " + e.message);
            }
        }
function queryMetaAll ( db , collName ) { const coll = db . getCollection ( getCollectionName ( collName ) ) ; try { const queryDocs = coll . find ( { [ metaIndexKey ] : { $gte : 0 } } ) . toArray ( ) ; assertAlways . eq ( numDocs , queryDocs . length , "Failed to find " + numDocs + " documents with meta field greater than or equal to 0. Query results: " + tojson ( queryDocs ) ) ; } catch ( e ) { assertAlways ( e . code == ErrorCodes . QueryPlanKilled , "Expected a QueryPlanKilled error, but encountered: " + e . message ) ; } }
Query all of the time-series collection documents by meta field.
Query all of the time - series collection documents by meta field .
// The query may fail because the index got dropped out from under it.