-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: mongorestore
-
None
-
30
Problem Statement/Rationale
I found that after restoring data through mongodump and mongorestore, there is a probability of losing the {_id: "hashed"} index
Steps to Reproduce
- Create a replica set (mongodb6.0)
- Create an index on {_id : "hashed" }
- insert some data
- run mongodump like: ./mongodump --host="xxx" --username="xxx" --password="ixxx" --authenticationDatabase="admin" --authenticationMechanism="SCRAM-SHA-1" --db="xxx" --collection="xxx"
- run mongorestore to restore data to other replicaset : ./mongorestore --host="xxx" --username="mongouser" --password="xxx" --authenticationDatabase="admin" --authenticationMechanism="SCRAM-SHA-1"
Expected Results
Actual Results
The index on {_id: "hashed"} sometimes may be missing.
Additional Notes
I found after jira: https://jira.mongodb.org/browse/TOOLS-3108.
Previously, the _id index was filtered by index name.
But now the following method is used.
So the {_id: "hashed} index may be filtered out incorrectly, depending on its order in the indexes array.
- is caused by
-
TOOLS-3108 Update mongorestore to support clustered collections
- Closed
- links to