USING TIMESTAMP is a CQL write clause that sets the write timestamp for an insert, update, or delete. Scylla uses that timestamp to reconcile concurrent writes. section 6.1.2 section 6.6
Use the clause with these behaviors in mind:
- A write with a newer timestamp replaces an older value; a write with an older timestamp is not saved. section 6.1.2
- One timestamp applies to every cell changed by a query; different cells cannot receive different timestamps in the same query. section 6.1.2
- The default query timestamp is normally preferred; explicitly setting one is especially useful during data migrations. section 6.1.2 section 12.2.4
Rejecting an obsolete update
UPDATE authors USING TIMESTAMP 1 SET bio = 'This bio is obsolete' WHERE id = eff9bd01-4a73-11ee-8863-c02b3f99d2b2; leaves Alice’s newer bio unchanged. INSERT statements can use the same clause after their VALUES expression.
