jstests/concurrency/fsm_workload_helpers/snapshot_read_utils.js
/**
 * This function can be used to share session data across threads.
 */
This function can be used to share session data across threads.
This function can be used to share session data across threads .
function insertSessionDoc(db, collName, tid, sessionId) {
    const sessionDoc = {"_id": "sessionDoc" + tid, "id": sessionId};
    const res = db[collName].insert(sessionDoc);
    assert.commandWorked(res);
    assert.eq(1, res.nInserted);
}
function insertSessionDoc ( db , collName , tid , sessionId ) { const sessionDoc = { "_id" : "sessionDoc" + tid , "id" : sessionId } ; const res = db [ collName ] . insert ( sessionDoc ) ; assert . commandWorked ( res ) ; assert . eq ( 1 , res . nInserted ) ; }
This function can be used to share session data across threads.
This function can be used to share session data across threads .