-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Cursors
Use Case
As a Node driver engineer,
I want our cursor implementation to use async-await,
So that it is easier to reason about and preserve async stacktraces when iterating cursors.
User Impact
n/a (internal refactor)
Dependencies
- N/A
Unknowns
- N/A
Acceptance Criteria
Implementation Requirements
The following cursor methods / utilities should be refactored to use async/await or native promises:
- AbstractCursor._initialize
- AbstractCursor._getMore
- cleanupCursor
- ensure try/catch/finally in the same order
- AbstractCursor[kInit]
We should also remove any dead code or unnecessary calls to promisify.
Testing Requirements
- Refactoring kInit will impact tests (which rely on it to initialize cursors) and the helpers which use it in tests should be updated to call the async method directly instead of promisifying the `kInit` function.
Documentation Requirements
- n/a
Follow Up Requirements
- n/a
- depends on
-
NODE-5502 Collection Watch Memory Leak
- Closed