node-mongodb-native
node-mongodb-native copied to clipboard
feat(NODE-6305): Add CSOT support to tailable cursors
Description
What is changing?
AbstractCursor
- Added logic to implement CSOT logic for tailable awaitData and non-awaitData cursors
onData
- Only relevant change here is the addition of the commented code used for debugging purposes. Other diffs in this area are due to a messy rebase, but have been checked and are consistent with the expected state of this code. note that all previous CSOT spec, prose and unit tests continue to pass.
RunCommandCursor
- Added support for
tailableandawaitDataflags
MongoClient
- added internal
timeoutMSgetter
Benchmarks
- Duplicated all existing benchmarks except the return document benchmark with csot enabled (with an infinite timeout)
Testing
- Unskipped (and fixed) tailable cursor Blocking Iteration method test
- Unskipped tailable awaitData and non-awaitData spec tests, duplicated and modified some tests which are only failing due to the the emission of a
killCursorsevent when cleaning up the test resources. Original tests that were skipped have accompanying TODO with linked ticket - Added int tests for tailable awaitData and non-awaitData cursors
- Updated UTR to interpret
cursorType - Updated UTR to pass through correct options for
RunCommandCursor
Is there new documentation needed for these changes?
Not for this PR
What is the motivation for this change?
Release Highlight
Fill in title or leave empty for no highlight
Double check the following
- [X] Ran
npm run check:lintscript - [X] Self-review completed using the steps outlined here
- [X] PR title follows the correct format:
type(NODE-xxxx)[!]: description- Example:
feat(NODE-1234)!: rewriting everything in coffeescript
- Example:
- [X] Changes are covered by tests
- [X] New TODOs have a related JIRA ticket