mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-28 07:59:02 +01:00
SERVER-17671 Clone admin database first during initial sync, to catch auth errors are early.
This commit is contained in:
parent
2a06bcb8e4
commit
bd03079b0f
@ -311,6 +311,13 @@ namespace {
|
||||
log() << "initial sync clone all databases";
|
||||
|
||||
list<string> dbs = r.conn()->getDatabaseNames();
|
||||
{
|
||||
// Clone admin database first, to catch schema errors.
|
||||
list<string>::iterator admin = std::find(dbs.begin(), dbs.end(), "admin");
|
||||
if (admin != dbs.end()) {
|
||||
dbs.splice(dbs.begin(), dbs, admin);
|
||||
}
|
||||
}
|
||||
|
||||
Cloner cloner;
|
||||
if (!_initialSyncClone(&txn, cloner, r.conn()->getServerAddress(), dbs, true)) {
|
||||
|
Loading…
Reference in New Issue
Block a user