mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-34306: include host in validate error messages
This commit is contained in:
parent
681d1e0bf8
commit
34333a94de
@ -70,7 +70,9 @@ function CollectionValidator() {
|
||||
' since collection was not found');
|
||||
continue;
|
||||
}
|
||||
print('Collection validation failed with response: ' + tojson(res));
|
||||
const host = db.getMongo().host;
|
||||
print('Collection validation failed on host ' + host + ' with response: ' +
|
||||
tojson(res));
|
||||
dumpCollection(coll, 100);
|
||||
success = false;
|
||||
}
|
||||
@ -92,14 +94,14 @@ function CollectionValidator() {
|
||||
const dbNames = conn.getDBNames();
|
||||
for (let dbName of dbNames) {
|
||||
if (!validatorFunc(conn.getDB(dbName), {full: true})) {
|
||||
return {ok: 0};
|
||||
return {ok: 0, host: host};
|
||||
}
|
||||
}
|
||||
return {ok: 1};
|
||||
} catch (e) {
|
||||
print('Exception caught in scoped thread running validationCollections on server: ' +
|
||||
host);
|
||||
return {ok: 0, error: e.toString(), stack: e.stack};
|
||||
return {ok: 0, error: e.toString(), stack: e.stack, host: host};
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user