-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.6.1
-
Component/s: Change Streams
-
Empty show more show less
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.