Skip to content

Commit eaf5006

Browse files
authored
Merge pull request #147 from josephschorr/watch-revision-metadata
Add a new repeated metadata field for revisions that contain multiple transactions
2 parents 3fd6bfb + 054df72 commit eaf5006

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

authzed/api/v1/watch_service.proto

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ message WatchResponse {
9393

9494
// optional_transaction_metadata is an optional field that returns the transaction metadata
9595
// given to SpiceDB during the transaction that produced the changes in this response.
96-
// This field may not exist if no transaction metadata was provided.
96+
// This field may not exist if no transaction metadata was provided, or if multiple pieces
97+
// of metadata were found during the transaction (in which case it is ambiguous which to return).
9798
google.protobuf.Struct optional_transaction_metadata = 3;
9899

99100
// schema_updated, if true, indicates that the schema was changed in this revision.
@@ -103,4 +104,10 @@ message WatchResponse {
103104
// A checkpoint indicates that the server guarantees that the client
104105
// will not observe any changes at a revision below or equal to the revision in this response.
105106
bool is_checkpoint = 5;
107+
108+
// full_revision_metadata contains all transaction metadata given to SpiceDB during the
109+
// revision that produced the changes in this response. Some datastores (such as CockroachDB)
110+
// can "merge" multiple transactions into a single revision (if the changes occurred concurrently),
111+
// so this field is a list of all transaction metadata seen during the revision.
112+
repeated google.protobuf.Struct full_revision_metadata = 6;
106113
}

0 commit comments

Comments
 (0)