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

Enhanced Mongodb integration source client update #4261

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

Conversation

paul-data-ai
Copy link

  • Implemented fallback connection method in case of ServerSelectionTimeoutError when using MongoDB as source for data integration.
  • Added serverSelectionTimeout (20 secs) to enhance connection speed

Description

This pull request introduced mainly a fallback method to the original method of connecting to MongoDB client when used as source for data integration. The main method often results in serverselectiontimeout, which doesn't occur with the fallback method.

How Has This Been Tested?

  • Local Database Connection Test: Tested the initial connection process with various scenarios, including server unavailability and slow network conditions, to ensure the serverSelectionTimeout works as expected.
  • Fallback Method Test: Deliberately induced ServerSelectionTimeoutError and the alternative format for passing credentials to the client builder to validate the effectiveness and reliability of the fallback connection method.

Checklist

  • Tagged the PR appropriately.
  • Performed a self-review of my code.

cc: @tommydangerous

- Added serverSelectionTimeout to enhance connection speed
- Implemented fallback connection method in case of ServerSelectionTimeoutError
- Adjusted logging for clearer error and status messages
@paul-data-ai paul-data-ai changed the title Enhannced Mongodb integration source client update Enhanced Mongodb integration source client update Dec 28, 2023
@wangxiaoyou1993
Copy link
Member

Hi @paul-data-ai , could you resolve the code quality check errors? You can set up pre-commit hook locally: https://github.com/mage-ai/mage-ai/blob/master/README_dev.md

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.

None yet

2 participants