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

Should Use Safe Insert in Mongo #20

Open
jbourdin opened this issue Aug 21, 2012 · 3 comments
Open

Should Use Safe Insert in Mongo #20

jbourdin opened this issue Aug 21, 2012 · 3 comments

Comments

@jbourdin
Copy link
Contributor

Since for testing purpose we check phactory writen data in mongo with our own code readden data, we are exposed to race condition.
It happens that Phactory::create use MongoCollection->insert and that '$collection->insert' don't wait for mongod response and our PHP test go on even if the data status is not what we expect. It happens for example on a slow development environnement.

I think Phactory::create should invoke collection->insert with array('safe'=>true) as second argument.

@jimbojsb
Copy link
Collaborator

Agree, if you submit a pull request, I will merge it.

@jbourdin
Copy link
Contributor Author

Working on it. But I just discovered that the Pear version, the one I use, seems way behind this one. I must take a few moments to update my test cases

@jimbojsb
Copy link
Collaborator

We haven't release the massive namespaces update on the pear channel yet, but I tagged it today, so it should appear on pearhub imminently.

On Aug 21, 2012, at 5:39 PM, Julien Bourdin [email protected] wrote:

Working on it. But I just discovered that the Pear version, the one I use, seems way behind this one. I must take a few moments to update my test cases


Reply to this email directly or view it on GitHub.

jimbojsb added a commit that referenced this issue Aug 21, 2012
Issue #20 : Should Use Safe Insert in Mongo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants