summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2015-06-01 17:04:20 -0400
committerScott Hernandez <scotthernandez@gmail.com>2015-06-01 17:04:20 -0400
commit0a7d47f9076bf6070b66462715ca225eca2cdb6b (patch)
treec6b21f1d91108130e54baefb67f3537c8975dbed /src/mongo/db/catalog
parent411802f844fa09bedb4f80d14e76bb94d2e3cae0 (diff)
downloadmongo-0a7d47f9076bf6070b66462715ca225eca2cdb6b.tar.gz
Revert "SERVER-17689: handle wce better in initial sync"
This reverts commit 411802f844fa09bedb4f80d14e76bb94d2e3cae0.
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r--src/mongo/db/catalog/database.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/mongo/db/catalog/database.cpp b/src/mongo/db/catalog/database.cpp
index e81a29826d3..726032a46c0 100644
--- a/src/mongo/db/catalog/database.cpp
+++ b/src/mongo/db/catalog/database.cpp
@@ -559,18 +559,10 @@ namespace mongo {
for (vector<string>::iterator i = n.begin(); i != n.end(); i++) {
if (*i != "local") {
- MONGO_WRITE_CONFLICT_RETRY_LOOP_BEGIN {
- Database* db = dbHolder().get(txn, *i);
- // This is needed since dropDatabase can't be rolled back.
- // This is safe be replaced by "invariant(db);dropDatabase(txn, db);" once fixed
- if (db == nullptr) {
- log() << "database disappeared after listDatabases but before drop: " << *i;
- } else {
- dropDatabase(txn, db);
- }
- } MONGO_WRITE_CONFLICT_RETRY_LOOP_END(txn,
- "dropAllDatabasesExceptLocal",
- *i);
+ Database* db = dbHolder().get(txn, *i);
+ invariant(db);
+
+ dropDatabase(txn, db);
}
}
}