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

MONGOID-5815 Respect client_override for new docs #5880

Merged
merged 9 commits into from
Oct 14, 2024

Conversation

comandeo-mongo
Copy link
Contributor

@comandeo-mongo comandeo-mongo commented Oct 11, 2024

This PR fixes the regression described in https://jira.mongodb.org/browse/MONGOID-5815. If client or database are overridden using override_client or override_database methods, they should be used for all persistence operations.

This behaviour is described nether in the docs nor in the comments. However, it used to be like this in 8, and we did not have an intention to change this behaviour in 9.

@comandeo-mongo comandeo-mongo marked this pull request as ready for review October 14, 2024 11:43
@comandeo-mongo comandeo-mongo requested a review from jamis October 14, 2024 11:44
@comandeo-mongo comandeo-mongo merged commit 67f7476 into mongodb:master Oct 14, 2024
61 checks passed
@comandeo-mongo comandeo-mongo deleted the 5815-client_override branch October 16, 2024 07:23
jamis pushed a commit to jamis/mongoid that referenced this pull request Oct 16, 2024
jamis added a commit that referenced this pull request Oct 17, 2024
* MONGOID-5815 Respect client_override for new docs (#5880)

* MONGOID-5805 Short-circuit the logic in extract_attribute to fix performance regression (backport to 8.1-stable) (#5869)

* short-circuit the logic in extract_attribute to fix performance regression

* short circuit on anything that's not a document or hash

* handle hash/string keys

---------

Co-authored-by: Dmitry Rybakov <160598371+comandeo-mongo@users.noreply.github.com>
jamis added a commit that referenced this pull request Oct 21, 2024
* MONGOID-5815 Respect client_override for new docs (#5880)

* MONGOID-5805 Short-circuit the logic in extract_attribute to fix performance regression (backport to 8.1-stable) (#5869)

* short-circuit the logic in extract_attribute to fix performance regression

* short circuit on anything that's not a document or hash

* handle hash/string keys

---------

Co-authored-by: Dmitry Rybakov <160598371+comandeo-mongo@users.noreply.github.com>
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.

2 participants