blob: b844a9d1a9f1a9ebc6e33316d4b4f8d1bb616e26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/**
* 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;
}
|