jstests/libs/override_methods/retry_on_killed_session.js
// Returns if the command should retry on killed session errors.
Returns if the command should retry on killed session errors.
Returns if the command should retry on killed session errors .
function shouldRetry(cmdObj) {
    if (cmdObj.hasOwnProperty("autocommit")) {
        return false;
    }
    const cmdName = Object.keys(cmdObj)[0];
    if (kReadCmds.has(cmdName) || cmdObj.hasOwnProperty("txnNumber")) {
        return true;
    }
    return TestData.alwaysRetryOnKillSessionErrors;
}
function shouldRetry ( cmdObj ) { if ( cmdObj . hasOwnProperty ( "autocommit" ) ) { return false ; } const cmdName = Object . keys ( cmdObj ) [ 0 ] ; if ( kReadCmds . has ( cmdName ) || cmdObj . hasOwnProperty ( "txnNumber" ) ) { return true ; } return TestData . alwaysRetryOnKillSessionErrors ; }
Returns if the command should retry on killed session errors.
Returns if the command should retry on killed session errors .
// Transactions are retried at a higher level. // Reads and retryable writes are idempotent so are safe to retry.