MongoEngine / MongoEngine/mongoengine
Support for shard keys in embedded documents
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 11
Description
Currently _object_key() only supports shard keys that are Document-level attributes, but MongoDB supports shard keys that are in embedded documents.
There does not seem to be a way using meta's shard_key to define these embedded shard keys in such a way that allows updates and saves to work again.
This seems to be an issue in 0.7, 0.8, dev, and master branches. I am currently having this issue with the 0.8.3 release.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing _object_key() and the metadata shard_key handling described in the issue. Check how embedded shard keys are represented and how updates and saves use the resulting key. Done means embedded-document shard keys work for updates and saves across the affected branches or supported versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100