-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2026-04-27
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
- Fix change stream cursor handling and consolidate log codes
This change improves the robustness of change stream operations by addressing several cursor management issues:
- Clear conflicting resume options (`startAtOperationTime`, `startAfter`) before setting `resumeAfter` to match server-side behavior
- Preserve `aggregateOptions` when storing cursor information and merge them properly during cursor recreation
- Update cursor objects in-place to maintain reference chains, ensuring callers always have the latest cursor ID
- Add debug logging for open cursor tracking to improve observability
- Consolidate V2 targeter log codes into a centralized `V2TargeterLogCodes` object and update all test files to use the shared constants
These fixes ensure change streams handle resume tokens correctly and maintain proper cursor state throughout their lifecycle.