-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
TAR 2023-11-27, TAR 2023-12-11
-
458
Problem Statement/Rationale
I am syncronizing differents mongodb instances with mongodump + mongorestore using the mongodump --db local --collection oplog.rs to export oplog records from source and mongorestore -oplogReplay to apply changes on target database.
When I create a index on source instance, mongodump export this operation from oplog and mongorestore apply this on target instance, but when I drop the index on source, mongodump export this operation but mongorestore don't apply the drop on destination.
Steps to Reproduce
1. Drop the index on source instance.
2. Export oplog from source:
mongodump --host localhost:27018 --db local --collection oplog.rs --out ./data/ --gzip
3. Import changes on target:
mongorestore --host localhost:27019 --gzip --oplogReplay --stopOnError ./data/local/oplog.rs.bson.gz
4. Check the indexes on source and destination
Expected Results
I expect that the index be removed on target database.
Actual Results
The file data/local/oplog.rs.bson contains both operation (createIndex and dropIndexes), but mongorestore can only create the index, not drop them.