Read operations
When executing a query against Cloud Spanner, clients may specify how up-to-date the data must be. By default, all Cloud Spanner queries are performed using strong reads that guarantee the most recent results, albeit with a slight performance hit. Every time data is modified, the affected data is timestamped using TrueTime. When a client performs a query, the executing node will ask its Paxos group leader for the most recent timestamp of that data. If the leader's timestamp matches the node's own timestamp, it can be sure that its data is up-to-date and it immediately returns the query results to the client.
If the leader's timestamp is more recent than the node's own timestamp, the node will instead hold on to the leader's ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access