Data consistency means that related views or copies agree with one another and reflect an appropriate current state. API designs must make their consistency guarantees explicit because apparently obvious choices can have subtle consequences. section 2.3.3 section 2.3.5
Consistency problems often arise when separate clients update the same resource. Replacing an entire resource can overwrite unrelated changes, while field-targeted updates reduce that risk. Without checks or locking, the last replacement may silently erase an earlier update. section 8.1.2
Concurrent ChatRoom updates
Two clients read the same ChatRoom. One changes its title; the other changes its description. If both call ReplaceChatRoom with their complete, older representations, the second call can restore the first client's field to an old or null value. Partial updates avoid treating unrelated field changes as a conflict, while consistency checks may instead reject the stale replacement and require a retry. section 8.1.2
Choose a consistency strategy that matches the operation and its failure modes:
- Treat list-valued fields as atomic values; exposing both whole-list replacement and individual-entry editing can create conflicting update paths. section 5.6.1
- Copy data from a point-in-time snapshot or inside one transaction when the destination must represent one coherent state. section 17.3.6
- If snapshots or transactions are unavailable, acknowledge that the copy may combine data from different times, or lock writes during the operation. section 17.3.6
- Do not treat validation results for a later criteria-based deletion as guaranteed execution results; matching data may change between requests. section 19.3.5
- Separate import and export from backup and restore: simple data movement provides no guarantees of atomic preservation or complete snapshot restoration. section 23.4
Table 8.1 An example sequence of code run by two users that could present problems (view table figure)
Inspect the two-client request sequence to see how whole-resource replacement causes one client's unrelated change to disappear. section 8.1.2
Staleness is not always a defect. Request deduplication may deliberately return a cached response from an earlier attempt so retries produce the same result as the original request, even when the resource has since changed. section 26.3.3



















