diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2018-04-27 11:20:51 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2018-04-27 11:20:51 -0400 |
commit | c7d12379bcd047c923b72bd29ac99d05edfbb82a (patch) | |
tree | 6889312ed290fc923f974aaea3cc82d8371ec10b /jstests/libs/retryable_writes_util.js | |
parent | 69ba26c48be6a1ae334e6221765941a413e37bf5 (diff) | |
download | mongo-c7d12379bcd047c923b72bd29ac99d05edfbb82a.tar.gz |
SERVER-34665 Update definition of retryable error in the mongo shell.
Also exposes a way to explicitly trigger retargeting before the next
operation is run on the DBClientRS underlying a replica set connection
by calling ReplicaSetMonitor::failedHost().
Diffstat (limited to 'jstests/libs/retryable_writes_util.js')
-rw-r--r-- | jstests/libs/retryable_writes_util.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/libs/retryable_writes_util.js b/jstests/libs/retryable_writes_util.js index 6c5c244045f..795fc33c254 100644 --- a/jstests/libs/retryable_writes_util.js +++ b/jstests/libs/retryable_writes_util.js @@ -4,6 +4,9 @@ var RetryableWritesUtil = (function() { /** * 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.isNotMasterError(code) || |