This will allow callers of APIs such as WriteRelationships and DeleteRelationships to assign metadata to the transaction that will be mirrored back out in the Watch API, to provide a means for correlating updates
First part of #966
Each datastore has a different means of correlating between the transaction and the associated change(s) coming out of the watch API:
Memdb: The metadata is stored on the changes struct
Postgres: A metadata column was added to the transactions table
MySQL: A metadata column was added to the transactions table
Spanner: A transaction tag is used to correlate the transaction and the metadata is stored in an auto-GC-ing table, indexed by the transaction tag
CRDB: A row is inserted into a metadata table as part of the transaction, which includes the metadata. When seen at the same revision as the other changes, the metadata becomes correlated with that transaction. The rows are set to auto-GC after a period of time
This will allow callers of APIs such as WriteRelationships and DeleteRelationships to assign metadata to the transaction that will be mirrored back out in the Watch API, to provide a means for correlating updates
First part of #966
Each datastore has a different means of correlating between the transaction and the associated change(s) coming out of the watch API:
metadata
column was added to the transactions tablemetadata
column was added to the transactions table