-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement support for metadata associated with read-write transactions #1914
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few questions and suggestions, I think the approach makes sense to me. The main concerns are how does this affect write-throughput, but at first glance it shouldn't introduce any new hotspots.
A potential issue here is the overlap with the concept of tuple-level metadata, but we've certainly heard more about this use case than tuple-level metadata. I also do wonder if folks will eventually ask for a transactions API to read these back, but that's an easy thing to do if the time comes.
Finally: I understand these are just the Datastore API changes, but we'd have to make sure there are limits put in place so that folks don't abuse that new field.
internal/datastore/crdb/migrations/zz_migration.0007_add_transaction_metadata_table.go
Outdated
Show resolved
Hide resolved
internal/datastore/spanner/migrations/zz_migration.0010_add_transaction_metadata_table.go
Outdated
Show resolved
Hide resolved
internal/datastore/spanner/migrations/zz_migration.0010_add_transaction_metadata_table.go
Show resolved
Hide resolved
cb0d605
to
86836c8
Compare
Updated |
86836c8
to
0ab7fa0
Compare
Rebased |
d5e92cc
to
4233a1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, see comment
e7f5ad8
to
f8bedfe
Compare
internal/datastore/spanner/migrations/zz_migration.0010_add_transaction_metadata_table.go
Show resolved
Hide resolved
internal/datastore/crdb/migrations/zz_migration.0008_add_transaction_metadata_table.go
Outdated
Show resolved
Hide resolved
internal/datastore/crdb/migrations/zz_migration.0008_add_transaction_metadata_table.go
Show resolved
Hide resolved
f8bedfe
to
f57f9b3
Compare
a6f4020
to
9402957
Compare
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
9402957
to
fb28510
Compare
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