-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Tools and Replicator
Problem Statement/Rationale
The collectionExists variable is populated here
And then used here:
If a mongodb client creates the collection between the time when it is created and when it is checked, it results in restore failure
Failed: mydb.mycollection: error creating collection mydb.mycollection: error running create command: a collection 'mydb.mycollection' already exists
Steps to Reproduce
Use a client that populates data into the collection at regular intervals. Delete the collection and run mongorestore. If executed sufficient number of times, this will hit this error.
Expected Results
This error should be ignored by mongorestore, since the intent is to create the collection anyway.
Actual Results
Restore fails.
Additional Notes