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-5582 Correctly interpret shard keys in embedded documents #5576

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

jamis
Copy link
Contributor

@jamis jamis commented Mar 15, 2023

If a shard key referenced a field in an embedded document, Mongoid was incorrectly retrieving the value of that field when building the shard key selector. This PR properly parses and evaluates such shard keys.

See: https://jira.mongodb.org/browse/MONGOID-5582

@johnnyshields
Copy link
Contributor

It would be good to handle #4991 as well on the topic of sharding.

spec/mongoid/shardable_spec.rb Outdated Show resolved Hide resolved
lib/mongoid/shardable.rb Show resolved Hide resolved
@jamis jamis requested a review from comandeo March 17, 2023 16:34
@jamis jamis merged commit 38a1286 into mongodb:master Mar 17, 2023
@jamis jamis deleted the 5582-shard-keys-from-embedded-docs branch March 17, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants