File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -181,8 +181,8 @@ public void doapply( DBObject o ){
181181
182182 @ Override
183183 public void drop () throws MongoException {
184- super .drop ();
185184 _collections .remove (getName ());
185+ super .drop ();
186186 }
187187
188188 public WriteResult insert (DBObject [] arr , com .mongodb .WriteConcern concern )
Original file line number Diff line number Diff line change @@ -674,9 +674,11 @@ public void dropIndexes( String name )
674674 .add ( "index" , name )
675675 .get ();
676676
677+ resetIndexCache ();
677678 CommandResult res = _db .command ( cmd );
679+ if (res .ok () || res .getErrorMessage ().equals ( "ns not found" ))
680+ return ;
678681 res .throwOnError ();
679- resetIndexCache ();
680682 }
681683
682684 /**
@@ -685,9 +687,11 @@ public void dropIndexes( String name )
685687 */
686688 public void drop ()
687689 throws MongoException {
690+ resetIndexCache ();
688691 CommandResult res =_db .command ( BasicDBObjectBuilder .start ().add ( "drop" , getName () ).get () );
692+ if (res .ok () || res .getErrorMessage ().equals ( "ns not found" ))
693+ return ;
689694 res .throwOnError ();
690- resetIndexCache ();
691695 }
692696
693697 /**
Original file line number Diff line number Diff line change 44
55 <test name =" main tests" >
66 <classes >
7- <class name =" com.mongodb.util.StringRangeSetTest" />
87 <class name =" com.mongodb.util.SimplePoolTest" />
98 <class name =" com.mongodb.util.JSONTest" />
109
1413 <class name =" org.bson.BSONTest" />
1514
1615 <class name =" org.bson.util.ClassMapTest" />
16+ <class name =" org.bson.util.StringRangeSetTest" />
1717
1818 <class name =" com.mongodb.ByteTest" />
1919 <class name =" com.mongodb.BasicDBObjectTest" />
You can’t perform that action at this time.
0 commit comments