Closed rgubby closed 8 years ago
did you check to see if the scripts in scripts/mongo
are affected by these changes? in principle the changes should be transparent but is it worth checking?
did you check to see if the scripts in scripts/mongo are affected by these changes? in principle the changes should be transparent but is it worth checking?
Yes - i checked - there was an amendment made to just one of the scripts but no others - they use Tripod methods to do anything.
This is to support the new mongo driver for PHP.
The PHP drivers implement a different API, so all chainable calls such as
->find()->sort()->limit()
have been replaced with another format. Read preferences have changed (how you set them), so have some of the function calls. An upgrade guide can be found here: https://mongodb.github.io/mongo-php-library/upgrade-guide/There are some requirement changes:
updateOne
orreplaceOne
function works with the current functionality with the new PHP mongo library. If we want to support older versions of Mongo, we'll need to change some functionality.A preview modification for Tripod involved retrying connections when stepping down and removing servers from the repset. I've gone through the same testing process with this new branch as I did on that PR. All works as expected.
Todo
db->getLastError()
does not work anymore - find a solution