Question 101 · 357 in bank
Your application takes an input from a user and publishes it to the user's contacts. This input is stored in a table in Cloud Spanner. Your application is more sensitive to latency and less sensitive to consistency. How should you perform reads from Cloud Spanner for this application?
Show answer
Answer: B
Explanation
As mentioned here https://cloud.google.com/spanner/docs/reference/rest/v1/TransactionOptions read-write transaction type has no options, and there is no way to make stale reads with this transaction type, so D) is definitely wrong. In the question, low latency is more critical than consistency, so C) is not an option. Read-Only transactions can do stale reads as well as Single Read methods, but in the documentation https://cloud.google.com/spanner/docs/transactions#read-only_transactions , they encourage to use SingleRead methods where possible. My vote is B)
Source: Adapted from community discussion — emmet