jloveridge / mongo-oplog2

Watch MongoDB oplog
0 stars 1 forks source link

Where is the code for version 3.0.0? #11

Open PieterScheffers opened 3 years ago

PieterScheffers commented 3 years ago

Thank you for creating this package. It works great so far!

I was looking at the code in github to check how mongo-oplog2 works under the hood. But the code isn't the same. Now I see that the last tag on github is 2.1.1 and the last commit Apr 13, 2020. https://github.com/jloveridge/mongo-oplog2/commits/master

When looking at the versions on NPM I see there have been some updates after that date with new tags (2.1.2 and 3.0.0). https://www.npmjs.com/package/mongo-oplog2?activeTab=versions

@jloveridge or @taxilian I assume you still have some code local on your PC. Could you push this to github?

taxilian commented 3 years ago

I think @jloveridge must have it, but it's worth noting that if you have a recent version of mongodb you may be better off using change streams, which reduce the complexity of dealing with things like transactions significantly.

PieterScheffers commented 3 years ago

Yes change streams are available from Mongo 3.6, but I need to sync a Mongo 3.4 database.

For our use case we want to upgrade the database to MongoDB 4.4. But that would mean some downtime and a stop-the-world. So our current plan of attack is to setup a second MongoDB 4.4 cluster. Then create a backup from the Mongo 3.4 cluster and put that on the 4.4 database. To then get all changes from the Mongo 3.4 cluster into the Mongo 4.4 cluster we want to use a microservice with this package. When this runs we can migrate microservices one-by-one to the new cluster.