mongo-oplog
mongo-oplog copied to clipboard
Updates to node-mongodb-native 3.3.3
In order to pick up a fix for https://www.npmjs.com/advisories/1203 we wanted to update the mongodb
version.
There were a couple of changes needed with the latest client:
- Needed to call
db()
to get the default DB object from the URI- http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#db
- The
close()
needs to be on the client, not the db -
nextObject()
has been renamed tonext()
on the cursor. - We saw
"op":"c"
events ahead of the"op":"i"
@peterbroadhurst thanks for this PR! This driver upgrade fixes an issue I had with connecting to the oplog on a 3.6 Atlas cluster. The problem I ran into is my connection string would specify the local
database but the connection would still go to the admin
database and it tried to execute the oplog queries there 🤦♂. It seems the new mongo driver has fixed this issue and mongo-oplog
correctly connects to local
.
It would be 💯to get this merged soon so I don't have to point our package.json
at a fork.