jstests/concurrency/fsm_workload_helpers/update_in_transaction_states.js
/**
 * Sends a multi=true update without the shard key that targets all documents assigned to this
 * thread, which should be sent to all shards.
 */
Sends a multi=true update without the shard key that targets all documents assigned to this
thread, which should be sent to all shards.
Sends a multi = true update without the shard key that targets all documents assigned to this thread which should be sent to all shards .
function multiUpdate(db, collName, session, tid) {
    const collection = session.getDatabase(db.getName()).getCollection(collName);
    withTxnAndAutoRetry(session, () => {
        assertWhenOwnColl.commandWorked(
            collection.update({tid: tid}, {$inc: {counter: 1}}, {multi: true}));
    });
    Object.keys(expectedCounters[collName]).forEach(id => {
        expectedCounters[collName][id] += 1;
    });
}
function multiUpdate ( db , collName , session , tid ) { const collection = session . getDatabase ( db . getName ( ) ) . getCollection ( collName ) ; withTxnAndAutoRetry ( session , ( ) => { assertWhenOwnColl . commandWorked ( collection . update ( { tid : tid } , { $inc : { counter : 1 } } , { multi : true } ) ) ; } ) ; Object . keys ( expectedCounters [ collName ] ) . forEach ( id => { expectedCounters [ collName ] [ id ] += 1 ; } ) ; }
Sends a multi=true update without the shard key that targets all documents assigned to this
 thread, which should be sent to all shards.
Sends a multi = true update without the shard key that targets all documents assigned to this thread which should be sent to all shards .
// The expected counter for every document owned by this thread should be incremented.