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

[master] MongoDB returner reuse database connections #66238

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

Conversation

ilinas
Copy link

@ilinas ilinas commented Mar 15, 2024

What does this PR do?

Improves mongo_future_return performance when used as master job cache by reusing database connections.

Probably no difference for mongo_return, but updated anyway for consistency.

What issues does this PR fix or reference?

Fixes: #55999

Previous Behavior

A new database connection established every time a returner function is called.

New Behavior

A database connection is reused when multiple functions are called in a single run.

Merge requirements satisfied?

Commits signed with GPG?

No

@ilinas ilinas requested a review from a team as a code owner March 15, 2024 13:30
@ilinas ilinas requested review from felippeb and removed request for a team March 15, 2024 13:30
Copy link

welcome bot commented Mar 15, 2024

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title MongoDB returner reuse database connections [master] MongoDB returner reuse database connections Mar 15, 2024
@provanguard
Copy link

We have tested this on production already and it works. Looking forward to getting it integrated. Great work @ilinas !

@ilinas
Copy link
Author

ilinas commented Apr 18, 2024

I cannot help but notice that the files have been removed from the source code. Are they being moved to another repository or simply gone? What should I do with this PR? Please advise.

@network-shark
Copy link
Contributor

network-shark commented Apr 18, 2024

@ilinas It seems that mongo stuff will be moved to extensions , but there is no mongo returner in this repo https://github.com/salt-extensions/saltext-mongodb/tree/main/src/saltext/mongodb , but think this will be the right place .

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.

MongoDB returner establishes a new database connection for every DB call
3 participants