-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: None
-
Component/s: None
-
3
-
Tools and Replicator
-
23
Problem Statement/Rationale
If a view is created during mongodump --oplog, it would capture an insert oplog entry on system.views:
{ ... op: "i", ns: "test.system.views", ... }. Mongorestore replaying this oplog on target cluster currently fails if system.views does not exist since system.views is not implicitly created by the server. The error from mongorestore looks like:
restore error: error applying oplog: ... (NamespaceNotFound) cannot apply insert or update operation on a non-existent namespace test.system.views: { ... op: "i", ns: "test.system.views", ... }
Steps to Reproduce
1. start mognodump with --oplog
2. create a view during oplog dump
3. mongorestore the archive with oplog entries to a target cluster
Expected Results
Mongorestore should handle the oplog correctly to create the view rather than failing with a NamespaceNotFound error.
Actual Results
restore error: error applying oplog: ... (NamespaceNotFound) cannot apply insert or update operation on a non-existent namespace test.system.views: { ... op: "i", ns: "test.system.views", ... }
Additional Notes
This showed up in a Resmoke test failure (link).