File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -757,8 +757,17 @@ When `resumeAfter` is specified the `ChangeStream` will return notifications sta
757
757
758
758
If the server supports sessions, the resume attempt MUST use the same session as the previous attempt's command.
759
759
760
- A driver MUST ensure that consecutive resume attempts can succeed, even in the absence of any changes received by the
761
- cursor between resume attempts.
760
+ A driver MUST only attempt to resume once from a resumable error. However, if the ` aggregate ` for that resume succeeds,
761
+ a driver MUST ensure that following resume attempts can succeed, even in the absence of any changes received by the
762
+ cursor between resume attempts. For example:
763
+
764
+ 1 . ` aggregate ` (succeeds)
765
+ 2 . ` getMore ` (fails with resumable error)
766
+ 3 . ` aggregate ` (succeeds)
767
+ 4 . ` getMore ` (fails with resumable error)
768
+ 5 . ` aggregate ` (succeeds)
769
+ 6 . ` getMore ` (succeeds)
770
+ 7 . change stream document received
762
771
763
772
A driver SHOULD attempt to kill the cursor on the server on which the cursor is opened during the resume process, and
764
773
MUST NOT attempt to kill the cursor on any other server. Any exceptions or errors that occur during the process of
@@ -1017,6 +1026,8 @@ There should be no backwards compatibility concerns.
1017
1026
1018
1027
## Changelog
1019
1028
1029
+ - 2025-09-08: Clarify resume behavior.
1030
+
1020
1031
- 2025-03-31: Update for expanded field visibility in server 8.2+
1021
1032
1022
1033
- 2025-02-24: Make ` nsType ` ` Optional ` to match other optional fields in the change stream spec.
You can’t perform that action at this time.
0 commit comments