This bypasses the error when users try to insert into system namespaces:
> db.system.foo.insert({})
2014-02-03T16:09:53.434-0500 batch failed, cannot aggregate results: cannot write to 'test.system.foo' at src/mongo/shell/batch_api.js:612
> db.system___foo.insert({})
SingleWriteResult({
"writeErrors" : [ ],
"writeConcernErrors" : [ ],
"nInserted" : 1,
"nUpserted" : 0,
"nUpdated" : 0,
"nModified" : 0,
"nRemoved" : 0,
"upserted" : [ ]
})
> db.system___foo.renameCollection('system.foo')
{ "ok" : 1 }
> db.system.foo.find()
{ "_id" : ObjectId("52f005ae6d0abd019aead824") }
- related to
-
SERVER-12586 $out shouldn't be able to write to system collections
-
- Closed
-