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

Schema manager should handle shard key on reference #1693

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

notrix
Copy link
Contributor

@notrix notrix commented Dec 19, 2017

Schema manager should also know how to handle shard key on reference
This PR is part of sharding key on reference fix. Referencing another PR #1687

@darceee2
Copy link

👍

Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See review below. Please note that the merge may take a few days (regardless of review issues) as I'm currently in the process of wrapping up the MongoDB driver switch and I don't want to endlessly rebase branches. Thanks for understanding.

lib/Doctrine/ODM/MongoDB/SchemaManager.php Outdated Show resolved Hide resolved
lib/Doctrine/ODM/MongoDB/SchemaManager.php Outdated Show resolved Hide resolved
@alcaeus
Copy link
Member

alcaeus commented Mar 9, 2018

@notrix after an eternity without updates, I finally managed to revisit this. I've created #1748 to fix this issue in the 1.2 branch, to be released in 1.2.2 soon.

I've rebased this branch on top of the current master to spare you the trouble - with the ext-mongodb and CS merges lots of things have changed. Due to the ext-mongodb change, sharding support in master is currently incomplete, so I've skipped the test for now. I'll revisit this in #1698 to work around the issues preventing finalizing this. Once #1748 has been merged, I'll also merge this branch down.

Thanks for your contribution! 🎉

@alcaeus alcaeus dismissed their stale review March 9, 2018 06:15

Issues fixed

@stale
Copy link

stale bot commented Jan 21, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Issues that have not seen any activity in 30 days label Jan 21, 2019
@stale stale bot closed this Jan 28, 2019
@alcaeus alcaeus reopened this Jan 29, 2019
@alcaeus alcaeus removed the Stale Issues that have not seen any activity in 30 days label Jan 29, 2019
@alcaeus alcaeus force-pushed the shard-collection-by-reference branch from 8a50e15 to 7c3d409 Compare February 15, 2019 06:30
@alcaeus alcaeus self-assigned this Feb 15, 2019
@alcaeus alcaeus added this to the 2.0.0-Beta2 milestone Feb 15, 2019

/**
* @ODM\Document(collection="sharded.users")
* @ODM\ShardKey(keys={"user"="asc"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @notrix, I had to change this from desc to asc as the test failed with the error that the shard key would could only be ascending or hashed.

@alcaeus alcaeus merged commit 942b03b into doctrine:master Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants