-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
Yet another sharding support implementation #1025
Conversation
It seems, tests failed because of long MongoDB initialization. Would be great if somebody re-ran them. |
1e87c16
to
2a903c2
Compare
@clslrns: I will attempt to get to this before the next beta tag. |
Btw, wouldn't it be better to squash all this commits? |
👍 |
@clslrns sorry for the long time without updates. Could you please rebase the branch to see if it still works against the current master? One more note:
Leave them as is - we can always talk about squashing commits before merging. For now this preserves important history. |
* @param object $document The document to refresh. | ||
*/ | ||
public function refresh($id, $document) | ||
public function refresh($document) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid this is a BC break. As useless as the ID parameter has become, it has to stay. Feel free to deprecate it though.
…d key keys definition
2a903c2
to
6bc01fd
Compare
5c882f4
to
415f19d
Compare
@alcaeus, thanks for the feedback. |
👍 |
Superseded by #1385. |
This one is inspired by #691.
Brief summary:
shardKey
property was added toClassMetadataInfo
, mapping support were added to all drivers. It's a hash withkeys
andoptions
.keys
was originally calledfields
, but I decided to conform to the indexes definition.shardKey
is class-based, since we need to keep the order of the keys to ensure compound index.ensureSharding
method were added toSchemaManager
. It's similar toensureIndex
. For non-empty collections it will runensureIndex
and retryshardCollection
again.DocumentPersister
usesshardKey
to generate query part forupsert
,update
,remove
,findOne
.I tried to cover all the new code with both unit and functional tests. Tests were run against sharded clusters of MongoDB 2.2.3, 2.4.9 and 2.6.5. Functional tests were tagged to avoid running against non-sharded setup.
Now I'm testing it on production. I'd like to receive some feedback from you guys to improve or change something.