[COMPASS-7456] Investigate changes in SERVER-79848: Difference in behavior of $_resumeAfter between classic and SBE engines Created: 15/Nov/23  Updated: 29/Jan/24  Resolved: 29/Jan/24

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-79848 Difference in behavior of $_resumeAft... Closed
Related
Epic Link: COMPASS-6403
Documentation Changes: Not Needed

 Description   
Original Downstream Change Summary

This patch makes it so that both the classic engine and SBE obey the following semantics for the $_requestResumeToken and $_resumeAfter query options:

  • For $_requestResumeToken, 'null' is returned as the resumeToken after scanning the last document in a collection (prior to this patch, SBE would return the record id of the last document).
  • When a null RecordId is specified to $_resumeAfter, we raise a KeyNotFound error (prior to this patch, the classic engine would restart the scan from the beginning).

    Description of Linked Ticket

    When resuming from the last record in a collection, the classic engine returns resume token {"$recordId" : null} and SBE returns the last record.
    Resuming from {"$recordId" : null} in the classic record cycles back to the start of the collection and raises "KeyNotFound" error in SBE.



 Comments   
Comment by Anna Henningsen [ 29/Jan/24 ]

No client-side impact according to DRIVERS-2777

Comment by PM Bot [ 20/Nov/23 ]

Fix Version updated for upstream SERVER-79848:
7.3.0-rc0, 7.2.0-rc2

Comment by PM Bot [ 15/Nov/23 ]

Fix Version updated for upstream SERVER-79848:
7.3.0-rc0

Generated at Wed Feb 07 22:46:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.