maxStaleness property

String? maxStaleness
getter/setter pair

Read data at a timestamp >= NOW - max_staleness seconds.

Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.

Implementation

core.String? maxStaleness;