Skip to content

Conversation

@rwynn
Copy link

@rwynn rwynn commented Jan 25, 2019

This PR includes a set of changes to change streams based on my testing

  • Fixes an issue with a stuck change stream by removing special cases (e.g. iter.isChangeStream) and treating the change stream as a wrapper around a normal iterator.
  • Fix the scenario where the iterator returns no results so the changeStream reports a timeout but the soft error on the iterator was not being reset, so the same timeout result happens repeatedly forever without fetching any new results.
  • Adds the ability to set the startAtOperationTime option for MongoDB 4.0+
  • Fixes some of the logic so that it is consistent across all change domains. Previously, the resume function would always reference the collection even if the change stream was created for a db or cluster.

@rwynn rwynn changed the title Change stream fixes Change stream enhancements Jan 27, 2019
@rwynn
Copy link
Author

rwynn commented Jan 30, 2019

@eminano I've just added one final change to the PR after some more testing. It seems during the resume the batch size and max time settings were not being applied to the new pipe.

on the iterator in order to do this correctly otherwise we
end up in a Next() loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants