Files
mongo/jstests/libs/storage_engine/storage_helpers.js
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00

12 lines
472 B
JavaScript

/**
* Retrieves the oldest required timestamp from the serverStatus output.
*
* @return {Timestamp} oldest required timestamp for crash recovery.
*/
export 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;
}