0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

SERVER-42316 always join all threads in run_check_repl_dbhash_background.js

This commit is contained in:
Gabriel Russell 2019-07-22 13:52:42 -04:00
parent 737bfd75a9
commit f79c017612

View File

@ -470,10 +470,20 @@
}
} finally {
// Wait for each thread to finish. Throw an error if any thread fails.
let exception;
const returnData = threads.map(thread => {
thread.join();
return thread.returnData();
try {
thread.join();
return thread.returnData();
} catch (e) {
if (!exception) {
exception = e;
}
}
});
if (exception) {
throw exception;
}
returnData.forEach(res => {
assert.commandWorked(res, () => 'data consistency checks failed: ' + tojson(res));