Stale update prevention
To prevent clients from unintentionally overwriting data due to out-of-order API
calls, several endpoints include an optional external_updated_at field in the
request body, which is a date-time type.
Since external_updated_at can never be reset, there is an extra check that the field is
never set to a date-time in the future. This prevents accidentally making a record
immutable.
When an external_updated_at value (e.g., a) is provided, TandemDrive will
compare it to the last stored external_updated_at value (e.g., b) for the
corresponding record. The request will be processed only if a is more recent
than or equal to b (a >= b). If not, the request will be ignored, and a 204 No Content
response will be returned. This mechanism ensures that outdated updates do not
overwrite newer changes.
Merge endpoints
The response contains a new field called stale_update if the request was an update.
This field specifies whether the request was a stale update or not.