The copy database operation, including the cloneCollection and copydb commands does not correctly create oplog entires for indexes. As a result theses operations fail to correctly replicate indexes to secondaries.
Collections created using cloneCollection and copydb will only have the correct indexes on the primary members of a replica set on the target instance. Secondary members of the target replica set will not have the correct indexes.
- Manually create indexes after using copydb or cloneCollection.
- Use mongodump and mongorestore to migrate data.
AFFECTED VERSIONS: 3.0.0
The fix is included in the 3.0.1 production release.
Change the way that the copy database operation generates oplog entires to ensure correct replication.