I'm new to MongoDB (inherited a project using it), so this is especially confusing.
I have a sharded replicaset between 3 ec2 instances. Everything works fine until I drop a database. The database drop replicates just fine - I can verify that - However, all subsequent inserts becomes out of sync, and only happen on the particular mongos instance the insert was performed on.
So here's the full process:
- Connect to mongos at primary:27017
- use someDatabase;
- db.dropDatabase();
- Connect to other 2 mongos and verify DB is dropped.
- Connect back to primary:27017 and insert a new document in that database
- Connect to other 2 mongos and realize the insert has not been replicated.
Everything was staying in sync until I dropped the database.
Should I not be performing these commands from from the mongos, and instead the primary replica member? I haven't figured out how to clean everything up yet to try and test that.
Thanks in advance!