You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Changes which errors are considered resumable on change streams,
adding support for the new ResumableChangeStreamError label.
- Updates ChangeStream prose tests which described startAfter
behavior for unsupported server versions.
- Fixes use of startAfter/resumeAfter when resuming from an
invalidate event. Implement prose tests #17 and #18.
NODE-2478
// From spec@https://github.com/mongodb/specifications/blob/f93d78191f3db2898a59013a7ed5650352ef6da8/source/change-streams/change-streams.rst#resumable-error
6
+
constGET_MORE_RESUMABLE_CODES=newSet([
7
+
6,// HostUnreachable
8
+
7,// HostNotFound
9
+
89,// NetworkTimeout
10
+
91,// ShutdownInProgress
11
+
189,// PrimarySteppedDown
12
+
262,// ExceededTimeLimit
13
+
9001,// SocketException
14
+
10107,// NotMaster
15
+
11600,// InterruptedAtShutdown
16
+
11602,// InterruptedDueToReplStateChange
17
+
13435,// NotMasterNoSlaveOk
18
+
13436,// NotMasterOrSecondary
19
+
63,// StaleShardVersion
20
+
150,// StaleEpoch
21
+
13388,// StaleConfig
22
+
234,// RetryChangeStream
23
+
133// FailedToSatisfyReadPreference
10
24
]);
11
25
12
-
// From spec@https://github.com/mongodb/specifications/blob/7a2e93d85935ee4b1046a8d2ad3514c657dc74fa/source/change-streams/change-streams.rst#resumable-error:
13
-
//
14
-
// An error is considered resumable if it meets any of the following criteria:
15
-
// - any error encountered which is not a server error (e.g. a timeout error or network error)
16
-
// - any server error response from a getMore command excluding those containing the error label
17
-
// NonRetryableChangeStreamError and those containing the following error codes:
18
-
// - Interrupted: 11601
19
-
// - CappedPositionLost: 136
20
-
// - CursorKilled: 237
21
-
//
22
-
// An error on an aggregate command is not a resumable error. Only errors on a getMore command may be considered resumable errors.
0 commit comments