-
-
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
[WIP] Feature sharding #325
Conversation
…dates and upserts. Removed also the id from the refresh method
*/ | ||
public function getDocumentQuery($document) | ||
{ | ||
if($this->class->hasQueryFields()) { |
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.
All the other code in Doctrine has a space between if
and (
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.
fixed
Looks interesting. So the queryFields will be stored in the reference document? What else do you see as being needed to support sharding fully? |
Yes we need to add the query fields to the reference document to make a correct shard query and after this we support sharding fully so we need nothing more. |
Ok. Can't wait to see the rest. |
Ok, I will finish it tomorrow :) |
Did you? :) |
I'll plan to take a look at this tomorrow on my local machine with a small sharding setup. @tecbot: Please let me know if anything is still TODO. |
@jmikola currently i'm working on the db ref stuff for reference mapping. |
*/ | ||
public function hasQueryFields() | ||
{ | ||
return $this->queryFields ? true : false; |
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.
couldnt this be return (boolean) $this->queryFields
?
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.
fixed in the next commits
@tecbot: I can't find contact info for you, but could we sync up in IRC or Google chat later today to discuss the PR? I'm in the #doctrine-dev channel. |
@jmikola ok. I'm in the the #doctrine-dev channel now. |
What's the progress on this feature? |
I want to finish the feature end of this week. |
What is left to be done? Can I help in some way? |
if you want you can help :), i haven't started any task of this at the moment. |
@@ -148,7 +148,7 @@ public function testReferencesUsesMinimalKeys() | |||
|
|||
$dm->expects($this->once()) | |||
->method('createDBRef') | |||
->will($this->returnValue(array('$ref' => 'coll', '$id' => '1234', '$db' => 'db'))); | |||
->will($this->returnValue(array('$id' => '1234'))); |
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.
Why is $ref
missing here? I can understand removing $db
, as it's optional, but reference objects require $ref
and $id
.
* @return mixed|object The document reference. | ||
*/ | ||
public function getReference($documentName, $identifier) | ||
public function getReference($documentName, $identifier, $query = null, array $sort = null) |
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.
What is the $sort
parameter used for, if this is for creating a proxy object?
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.
yes its for the inverse side proxy. in this case we need the $sort
parameter
@jmikola Ping, just curious on what the progress of this is/if it's going to be implemented in 1.0 |
Superseded by #1385. |
Hi,
i have implemented a first version of sharding support. I added a new annotation "QueryFields" to change the core query routine for a document.
The next step is to update the reference mappings to include the query fields in the reference object. But first I want some feedback from you.
Issue: #304
Regards
Thomas