Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NODE-4125): change stream resumability #3289

Merged
merged 31 commits into from
Jun 22, 2022

Commits on Jun 15, 2022

  1. test: add resumabilty tests for change streams

    - adds resumability tests for the iterator based API (tryNext, hasNext and next)
    - adds resumability tests for the event emitter-based API
    - adds tests demonstrating that change streams do not resume on
       unresumable errors for iterator and event emitter based apis
    - adds tests for resumability iterator mode on 3.6 servers
    - adds resume options tests to resumability tests
    baileympearson committed Jun 15, 2022
    Configuration menu
    Copy the full SHA
    2dceb56 View commit details
    Browse the repository at this point in the history
  2. fix: use server selection in change stream resume process

    This commit removes a custom function we had to wait until the topology
    was reconnected in favor of performing server selection.  This is described
    here: https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.rst#resume-process
    baileympearson committed Jun 15, 2022
    Configuration menu
    Copy the full SHA
    94a4853 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    881dcf2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1a0d82b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    45a56d2 View commit details
    Browse the repository at this point in the history
  6. fix: lint error

    baileympearson committed Jun 15, 2022
    Configuration menu
    Copy the full SHA
    b7d2481 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    44635ba View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6ee61da View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f65cc73 View commit details
    Browse the repository at this point in the history
  10. test: fix tryNext tests on sharded clusters

    	tryNext is not blocking and on sharded clusters we don't have control of when
    	the actual change event will be ready on the change stream pipeline. This introduces
    	a race condition, where sometimes we receive the change event and sometimes
    	we don't when we call tryNext, depending on the timing of the sharded cluster.
    
    	Since we really only care about the resumability, it's enough for this test to throw
    	if tryNext ever throws and assert on the number of aggregate events.
    baileympearson committed Jun 15, 2022
    Configuration menu
    Copy the full SHA
    28e1b77 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2022

  1. Configuration menu
    Copy the full SHA
    ab155d3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5647d0b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    031043a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b85dc73 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    68a184c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3239fe1 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2022

  1. Configuration menu
    Copy the full SHA
    2fb5b7c View commit details
    Browse the repository at this point in the history
  2. chore: misc fixes

    - removes MongoClient.connect() call from new change stream tests
    - awaits a promise in iterateUntilDocumentOrError in the unified runner
    - removes an unused method in the change stream class
    baileympearson committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    315343e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d0d0641 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    51a2907 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e20fe96 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    56dbbef View commit details
    Browse the repository at this point in the history
  7. chore: address comments in tests

    - use to.be.a('number') in assertion
    - remove bracket style type assertion in favor of as
    baileympearson committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    8414b36 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    14f3fc2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    50980b8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6eb5537 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    537cadf View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. Configuration menu
    Copy the full SHA
    8f99a98 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa3851f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5e18998 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f848edc View commit details
    Browse the repository at this point in the history