-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.3
-
Component/s: None
-
None
One way to reproduce:
var server = MongoServer.Create("mongodb://localhost/?safe=true");
var database = server["test"];
var text = "Hello World";
var stream = new MemoryStream(Encoding.UTF8.GetBytes(text));
database.Drop();
database.GridFS.Upload(stream, "testfile");
database.Drop();
database.GridFS.Upload(stream, "testfile");
The second upload fails because the index on
{ files_id : 1, n : 1 }does not exist on the fs.chunks collection. EnsureIndex failed to create it the second time because DropDatabase didn't clear the IndexCache.