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

Changestream not working after primary election

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.1
    • Component/s: Change Streams

      A change stream is set up on a replicaSet like:

      stream = this.collection.watch([], { batchSize: 1000, maxAwaitTimeMS: 1000 })
      
      stream.on('change', event => {
          console.log(event.operationType)
      })
      

      The change stream passes events like normal. Now in the mongo shell, I run this command on the primary:

      rs.stepDown()

      The election happens and the nodejs client emits left and join events, however now the change stream no longer emits any change events (and no other event appears to occur). If the changestream is recreated, change events are emitted like normal.

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            samuel.lewis@borntec.com Samuel Lewis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: