-
Notifications
You must be signed in to change notification settings - Fork 772
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
Change MongoDB Connection's interface to implement a .run() #975
Comments
I like what we do with I have been looking at the
|
From #977, when this is done, we should also port some of the RethinkDB connection tests to MongoDB's connection. |
I moved this issue to a different milestone.
This raises a lot of new questions that should be handled when you actually perform tests on a cluster. |
A note that we got from MongoDB regarding our connection code:
From pymongo documentation:
So the driver automatically reconnects if the connection goes down or the primary changes but it still raises an
This means that the operation may or may have not gone through so for inserts its important that we catch a |
That's pretty interesting, but unfortunately there is no |
I've explored the |
Here we go! Two PRs for this issue. I want to give more context about the two solutions. #1100 implements a new object called #1109 approach is simpler, and it just uses lambda functions to achieve a similar behavior. #1100 is one order of magnitude slower than #1109, but it's not a bummer IMO:
#1100 uses less code (and this is a plus), #1109 is more ergonomic. Ideas? |
Closing as #1100 implements this. |
From #890 (review).
pymongo
's interface is very different thanrethinkdb
's with queries being run directly through the mongodb connection object rather than a.run()
method. We should discuss ifConnection
s should still be expected to have a .run() method.The text was updated successfully, but these errors were encountered: