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
757757
758758If the server supports sessions, the resume attempt MUST use the same session as the previous attempt's command.
759759
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
762771
763772A driver SHOULD attempt to kill the cursor on the server on which the cursor is opened during the resume process, and
764773MUST 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.
10171026
10181027## Changelog
10191028
1029+ - 2025-09-08: Clarify resume behavior.
1030+
10201031- 2025-03-31: Update for expanded field visibility in server 8.2+
10211032
10221033- 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