Module timekeeper

Source
Expand description

There is a key range called TimeKeeper in the system key space which stores a rolling history window of time to version mappings, with one data point every 10 seconds. It is not exposed via any user-facing API, though of course the data can be read by a user. It is not an official database feature and should not be relied on for anything where accuracy is critical as nothing prevents or detects system clock skew on the FDB process logging these data points.

TimeKeeper is used by backup and restore to convert timestamps to approximate versions and versions to approximate timestamps to make reasoning about backup data and restore operations easier. Lookups work by finding the nearest value for the query version or timestamp, taking the equivalent other value, and then adding an adjustment estimate based on 1 million versions per 1 second. This logic accounts for arbitrary version advancement due to recovery, DR switch operations, or any other reason.

source

Enums§

HintMode
Flavor about the mode of scanning

Functions§

hint_version_from_timestamp
Try to get a version ID closer as possible as the asked timestamp