diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp index fbc278cf4c9..c9c4662cef9 100644 --- a/db/dbcommands.cpp +++ b/db/dbcommands.cpp @@ -598,7 +598,7 @@ namespace mongo { // delete just one index int x = d->findIndexByName(name); if ( x >= 0 ) { - out() << " d->nIndexes was " << d->nIndexes << endl; + log(4) << " d->nIndexes was " << d->nIndexes << endl; anObjBuilder.append("nIndexesWas", (double)d->nIndexes); /* note it is important we remove the IndexDetails with this diff --git a/db/pdfile.cpp b/db/pdfile.cpp index ce74417023c..035e92e7a4e 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -628,7 +628,13 @@ assert( !eloc.isNull() ); b.append("ns", parentNS().c_str()); BSONObj cond = b.done(); // e.g.: { name: "ts_1", ns: "foo.coll" } - btreeStore->drop(ns.c_str()); + /* important to catch exception here so we can finish cleanup below. */ + try { + btreeStore->drop(ns.c_str()); + } + catch(DBException& ) { + log(2) << "IndexDetails::kill(): couldn't drop ns " << ns << endl; + } head.setInvalid(); info.setInvalid();