Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move retry logic to mongochangestream. #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dubiousdavid
Copy link
Member

  • Latest mongochangestream - Move retry logic to mongochangestream.
  • Removed immutable option.

Copy link
Contributor

@daveyarwood daveyarwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will accidentally result in there not being any retries in mongo2crate.

I was looking at this recently, and I noticed that there are a couple of try/catches in syncData.ts (example) around Crate operations, so if they fail, we're catching the error and emitting an "error" event instead. In that case, because no error is thrown, mongochangestream would not retry.

I think we need to remove the try/catches too, but it would also be good to ensure that only one "error" event is emitted at the end after the retries, which I think indicates that we need to emit the error event in mongochangestream. See my WIP PR: smartprocure/mongochangestream#30

src/syncData.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants