Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4051

Investigate NODE-3672 - Race Condition in change stream error handling

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • 3
    • Not Needed

      NODE-3672 Description

      What problem are you facing?

      We are on migration process of our Mongo servers to version 5.0. Making this happen, it was necessary an upgrade from our services to new driver (>=4.0) where we found a problem that didn't use to happen in a previous versions (<4.0).

      We have been using the Mongo resource "collection watcher" for update our caches into the applications, but we noticed that Mongo Atlas makes a not planning rebalance of the nodes ReplicaSet. When this happen the class ChangeStream receives a close signal and the applications stop receiving new database updates.

      What driver and relevant dependency versions are you using?

      Driver NODEJS version 4.1

      Steps to reproduce?

      1 - Create a basic ChangeStream and listen the close event;
      2 - Start application;
      3 - Execute failover test into the interface Mongo Atlas, or change the primary node of the replicaSet manually;
      4 - The application must receive close signal and stop receiving new updates.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            dbeng-pm-bot PM Bot
            Bailey Pearson
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: