jstests/libs/retryable_writes_util.js
/**
     * Returns true if the error code is retryable, assuming the command is idempotent.
     *
     * TODO SERVER-34666: Expose the isRetryableCode() function that's defined in
     * src/mongo/shell/session.js and use it here.
     */
Returns true if the error code is retryable, assuming the command is idempotent.
TODO SERVER-34666: Expose the isRetryableCode() function that's defined in
src/mongo/shell/session.js and use it here.
Returns true if the error code is retryable assuming the command is idempotent . TODO SERVER - 34666 : Expose the isRetryableCode () function that ' s defined in src / mongo / shell / session . js and use it here .
function isRetryableCode(code) {
        return ErrorCodes.isNetworkError(code) || ErrorCodes.isNotPrimaryError(code) ||
            ErrorCodes.isWriteConcernError(code) || ErrorCodes.isShutdownError(code) ||
            ErrorCodes.isInterruption(code);
    }
function isRetryableCode ( code ) { return ErrorCodes . isNetworkError ( code ) || ErrorCodes . isNotPrimaryError ( code ) || ErrorCodes . isWriteConcernError ( code ) || ErrorCodes . isShutdownError ( code ) || ErrorCodes . isInterruption ( code ) ; }
Returns true if the error code is retryable, assuming the command is idempotent.
Returns true if the error code is retryable assuming the command is idempotent .