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

Spike: ChangeStream INIT event

      Context

      Currently, the ChangeStream class incorrectly documents an INIT event, but it never actually emits the INIT event. This was the source of confusion in NODE-5203. On a surface level this is because the INIT event was never in the CHANGE_STREAM_EVENTS const array. The events in this array are set to bubble up to the ChangeStream from its underlying ChangeStreamCursor in the _createChangeStreamCursor.

       

      Open Questions

      • How does a user know that the initial aggregation has been sent to the server?
      • Does it make sense to emit the ChangeStream.INIT event at the point when the ChangeStreamCursor.INIT event is emitted or is there more work to be done before we can consider our ChangeStream to be initialized?
      • How can the API communicate to the user that it has begun the first command?

            Assignee:
            Unassigned Unassigned
            Reporter:
            warren.james@mongodb.com Warren James
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: