node-mongodb-native icon indicating copy to clipboard operation
node-mongodb-native copied to clipboard

feat(NODE-6305): Add CSOT support to tailable cursors

Open W-A-James opened this issue 1 year ago • 0 comments

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 tailable and awaitData flags
MongoClient
  • added internal timeoutMS getter
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 killCursors event 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:lint script
  • [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
  • [X] Changes are covered by tests
  • [X] New TODOs have a related JIRA ticket

W-A-James avatar Sep 03 '24 19:09 W-A-James