Files
mongo/jstests/libs/storage_helpers.js
Suganthi Mani 8b97a28459 SERVER-45718 Index builder ensures empty collection by reading data from
the WT cursor in order to avoid false negatives by fast count.
2020-01-27 20:29:54 +00:00

13 lines
476 B
JavaScript

/**
* Retrieves the oldest required timestamp from the serverStatus output.
*
* @return {Timestamp} oldest required timestamp for crash recovery.
*/
function getOldestRequiredTimestampForCrashRecovery(database) {
const res = database.serverStatus().storageEngine;
const ts = res.oldestRequiredTimestampForCrashRecovery;
assert(ts instanceof Timestamp,
'oldestRequiredTimestampForCrashRecovery was not a Timestamp: ' + tojson(res));
return ts;
}